X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fagent%2Fwebserver.go;h=c9f3acdb169930252543664939f1ebbb43e9d007;hb=7c7d90a781082c6bd22d12a5e2451ca61a5198af;hp=b75abd43d050f05d45a5e04ead08117c08688827;hpb=0a5ab2ca1ab89e6e667b7f9c7bdffdff036ca9b7;p=src%2Fxds%2Fxds-agent.git diff --git a/lib/agent/webserver.go b/lib/agent/webserver.go index b75abd4..c9f3acd 100644 --- a/lib/agent/webserver.go +++ b/lib/agent/webserver.go @@ -11,7 +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" + "github.com/iotbzh/xds-agent/lib/xaapiv1" ) // WebServer . @@ -233,8 +233,8 @@ 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.events.UnRegister(xaapiv1.EVTAll, sess.ID) s.sessions.UpdateIOSocket(sess.ID, nil) - s.events.UnRegister(apiv1.EVTAll, sess.ID) }) })