mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Create + Delete session.
This commit is contained in:
@ -49,13 +49,14 @@ func (h *MessageHandlerCtx) Connected(session types.Session, websocket_peer type
|
||||
return true, ""
|
||||
}
|
||||
|
||||
// TODO: Remove, unused.
|
||||
func (h *MessageHandlerCtx) Disconnected(id string) error {
|
||||
// TODO: Refactor.
|
||||
if h.locked && len(h.sessions.Admins()) == 0 {
|
||||
h.locked = false
|
||||
}
|
||||
|
||||
return h.sessions.Destroy(id)
|
||||
return h.sessions.Delete(id)
|
||||
}
|
||||
|
||||
func (h *MessageHandlerCtx) Message(session types.Session, raw []byte) error {
|
||||
|
Reference in New Issue
Block a user