mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 10:46:16 +01:00
send websocket close message to agent
This commit is contained in:
@@ -100,8 +100,7 @@ func (acr *agentConnectRequest) verifyWsConn(conn *gws.Conn, fpRecords []ws.Fing
|
||||
// make sure connection is closed if there is an error
|
||||
defer func() {
|
||||
if err != nil {
|
||||
wsConn.Close()
|
||||
acr.hub.Logger().Error("WebSocket error", "error", err, "systems", fpRecords)
|
||||
wsConn.Close([]byte(err.Error()))
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user