MCPcopy
hub / github.com/lonng/nano / userDisconnected

Method userDisconnected

examples/cluster/chat/chat_service.go:54–60  ·  view source on GitHub ↗
(s *session.Session)

Source from the content-addressed store, hash-verified

52}
53
54func (rs *RoomService) userDisconnected(s *session.Session) {
55 if err := rs.group.Leave(s); err != nil {
56 log.Println("Remove user from group failed", s.UID(), err)
57 return
58 }
59 log.Println("User session disconnected", s.UID())
60}

Callers 1

OnSessionClosedFunction · 0.45

Calls 3

LeaveMethod · 0.80
PrintlnMethod · 0.80
UIDMethod · 0.80

Tested by

no test coverage detected