ing
This commit is contained in:
parent
6d0ae76b5c
commit
5b37f92411
|
@ -33,8 +33,6 @@ func (srw *ServerReadWriter) HandleConnection(servlet Servlet, servletCtx server
|
||||||
if nil != conn {
|
if nil != conn {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
}
|
}
|
||||||
servlet.OnDisconnect(servletCtx)
|
|
||||||
olog.Logger().Info("Client has been disconnected", zap.String("Address", addr.String()))
|
|
||||||
srw.ServerStopWg.Done()
|
srw.ServerStopWg.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -46,6 +44,10 @@ func (srw *ServerReadWriter) HandleConnection(servlet Servlet, servletCtx server
|
||||||
servlet.OnConnect(servletCtx, conn)
|
servlet.OnConnect(servletCtx, conn)
|
||||||
conn.SetCloseHandler(func(code int, text string) error {
|
conn.SetCloseHandler(func(code int, text string) error {
|
||||||
olog.Logger().Debug("close")
|
olog.Logger().Debug("close")
|
||||||
|
|
||||||
|
servlet.OnDisconnect(servletCtx)
|
||||||
|
olog.Logger().Info("Client has been disconnected", zap.String("Address", addr.String()))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user