feat: add server stats

This commit is contained in:
2024-11-13 22:45:03 +00:00
parent 2d4c81e15d
commit 7a00992ff9
12 changed files with 452 additions and 32 deletions
+6 -3
View File
@@ -2,6 +2,7 @@ package hosts
import (
"fmt"
"log"
"github.com/gofiber/fiber/v2"
"rul.sh/vaulterm/app/keychains"
@@ -40,12 +41,14 @@ func tryConnect(c *fiber.Ctx, host *models.Host) (string, error) {
AltKey: altKey,
})
con, err := c.Connect()
if err != nil {
if err := c.Connect(); err != nil {
return "", err
}
defer c.Close()
os, err := c.GetOS(c, con)
log.Println("Test", c.Conn)
os, err := c.GetOS(c)
if err != nil {
return "", err
}