diff options
Diffstat (limited to 'lib/agent/webserver.go')
-rw-r--r-- | lib/agent/webserver.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/agent/webserver.go b/lib/agent/webserver.go index d15236d..b75abd4 100644 --- a/lib/agent/webserver.go +++ b/lib/agent/webserver.go @@ -11,6 +11,7 @@ import ( "github.com/gin-contrib/static" "github.com/gin-gonic/gin" "github.com/googollee/go-socket.io" + "github.com/iotbzh/xds-agent/lib/apiv1" ) // WebServer . @@ -233,6 +234,7 @@ func (s *WebServer) socketHandler(c *gin.Context) { so.On("disconnection", func() { s.Log.Debugf("WS disconnected (WSID=%s, SID=%s)", so.Id(), sess.ID) s.sessions.UpdateIOSocket(sess.ID, nil) + s.events.UnRegister(apiv1.EVTAll, sess.ID) }) }) |