mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
minor session changes.
This commit is contained in:
parent
e5eaf5c60c
commit
7c64e6068a
@ -89,7 +89,7 @@ func (session *SessionCtx) Disconnect(reason string) error {
|
||||
}
|
||||
|
||||
// TODO: Refcator
|
||||
if err := session.socket.Send(&message.Disconnect{
|
||||
if err := session.Send(&message.Disconnect{
|
||||
Event: event.SYSTEM_DISCONNECT,
|
||||
Message: reason,
|
||||
}); err != nil {
|
||||
|
@ -174,14 +174,14 @@ func (ws *WebSocketManagerCtx) Upgrade(w http.ResponseWriter, r *http.Request) e
|
||||
Debug().
|
||||
Str("session", session.ID()).
|
||||
Str("address", connection.RemoteAddr().String()).
|
||||
Msg("new connection created")
|
||||
Msg("connection started")
|
||||
|
||||
defer func() {
|
||||
ws.logger.
|
||||
Debug().
|
||||
Str("session", session.ID()).
|
||||
Str("address", connection.RemoteAddr().String()).
|
||||
Msg("session ended")
|
||||
Msg("connection ended")
|
||||
}()
|
||||
|
||||
ws.handle(connection, session)
|
||||
|
Loading…
Reference in New Issue
Block a user