func (s *Server) delPeer(sid proto.SID, uid proto.UID) {
	log.Infof("delPeer sid=%s uid=%s", sid, uid)
	room := s.getRoom(sid)
	if room == nil {
		log.Warnf("room not exits, sid=%s, uid=%s", sid, uid)
		return
	}
	if room.delPeer(uid) == 0 {
		s.roomLock.RLock()
		delete(s.rooms, sid)
		s.roomLock.RUnlock()
	}
}
// delPeer delete a peer in the room
delPeer delete a peer in the room
// delPeer delete a peer in the room
func (s *Server) delPeer(sid proto.SID, uid proto.UID) {
	log.Infof("delPeer sid=%s uid=%s", sid, uid)
	room := s.getRoom(sid)
	if room == nil {
		log.Warnf("room not exits, sid=%s, uid=%s", sid, uid)
		return
	}
	if room.delPeer(uid) == 0 {
		s.roomLock.RLock()
		delete(s.rooms, sid)
		s.roomLock.RUnlock()
	}
}
func ( s * Server ) delPeer ( sid proto . SID , uid proto . UID ) { log . Infof ( " " , sid , uid ) room := s . getRoom ( sid ) if room == nil { log . Warnf ( " " , sid , uid ) return } if room . delPeer ( uid ) == 0 { s . roomLock . RLock ( ) delete ( s . rooms , sid ) s . roomLock . RUnlock ( ) } }
delPeer delete a peer in the room
delPeer delete a peer in the room