fix fromJust issue
This commit is contained in:
parent
bcda028720
commit
56590056f2
1 changed files with 5 additions and 2 deletions
|
@ -67,8 +67,11 @@ handleMessage stateContainer readerContainer msg = do
|
||||||
currentPlayers <- STM.atomically $ STM.readTMVar (scPlayers stateContainer)
|
currentPlayers <- STM.atomically $ STM.readTMVar (scPlayers stateContainer)
|
||||||
let newPlayers = filter (\p -> playerId p /= clientId) currentPlayers
|
let newPlayers = filter (\p -> playerId p /= clientId) currentPlayers
|
||||||
void $ STM.atomically $ STM.swapTMVar (scPlayers stateContainer) newPlayers
|
void $ STM.atomically $ STM.swapTMVar (scPlayers stateContainer) newPlayers
|
||||||
let client = find (\a -> csUUID a == Just clientId) socks
|
let mclient = find (\a -> csUUID a == Just clientId) socks
|
||||||
dropClient curLevel socketList queueList (csSocket $ fromJust client)
|
maybe
|
||||||
|
(logPrintIO curLevel Warning $ "unknown client: " <> show clientId)
|
||||||
|
(dropClient curLevel socketList queueList . csSocket)
|
||||||
|
mclient
|
||||||
logPrintIO curLevel Info $ "client has quit the game: " <> show clientId
|
logPrintIO curLevel Info $ "client has quit the game: " <> show clientId
|
||||||
ClientRequestWizard -> do
|
ClientRequestWizard -> do
|
||||||
let arena = rcMap readerContainer
|
let arena = rcMap readerContainer
|
||||||
|
|
Loading…
Reference in a new issue