mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-10 23:57:27 +02:00
Create + Delete session.
This commit is contained in:
parent
104d98d129
commit
665d9d2130
4 changed files with 40 additions and 36 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue