func (s *Socket) onError(errC chan<- error) func() {
	return func() {
		s.user.Logout()
		errC <- errors.New("lobby closed")
	}
}
// onMessage is called when the websocket encounters an unwanted error.
onMessage is called when the websocket encounters an unwanted error.
// onMessage is called when the websocket encounters an unwanted error .
func (s *Socket) onError(errC chan<- error) func() {
	return func() {
		s.user.Logout()
		errC <- errors.New("lobby closed")
	}
}
func ( s * Socket ) onError ( errC chan <- error ) func ( ) { return func ( ) { s . user . Logout ( ) errC <- errors . New ( " " ) } }
onMessage is called when the websocket encounters an unwanted error.
onMessage is called when the websocket encounters an unwanted error .