Commit 7ded0bae authored by ibuler's avatar ibuler

[Update] 添加msg

parent 443d96e6
...@@ -55,6 +55,11 @@ func StartHTTPServer() { ...@@ -55,6 +55,11 @@ func StartHTTPServer() {
return neffos.DefaultIDGenerator(w, r) return neffos.DefaultIDGenerator(w, r)
} }
sshWs.OnUpgradeError = func(err error) { sshWs.OnUpgradeError = func(err error) {
if ok := neffos.IsTryingToReconnect(err); ok {
logger.Debug("A client was tried to reconnect")
return
}
logger.Error("ERROR: ", err)
} }
sshWs.OnConnect = func(c *neffos.Conn) error { sshWs.OnConnect = func(c *neffos.Conn) error {
if c.WasReconnected() { if c.WasReconnected() {
...@@ -62,7 +67,6 @@ func StartHTTPServer() { ...@@ -62,7 +67,6 @@ func StartHTTPServer() {
} else { } else {
logger.Debug("A new ws connection arrive") logger.Debug("A new ws connection arrive")
} }
return nil return nil
} }
sshWs.OnDisconnect = func(c *neffos.Conn) { sshWs.OnDisconnect = func(c *neffos.Conn) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment