mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
drop client connection when in the wrong state rather than asserting.
This commit is contained in:
parent
bd611bb6f4
commit
fc2e87e0c4
1 changed files with 23 additions and 21 deletions
|
@ -474,8 +474,7 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
|
|||
|
||||
XP_ASSERT( gi->serverRole == SERVER_ISCLIENT );
|
||||
XP_ASSERT( stream != NULL );
|
||||
XP_ASSERT( server->nv.gameState == XWSTATE_NONE );
|
||||
|
||||
if ( server->nv.gameState == XWSTATE_NONE ) {
|
||||
stream_open( stream );
|
||||
|
||||
stream_putBits( stream, XWPROTO_NBITS, XWPROTO_DEVICE_REGISTRATION );
|
||||
|
@ -502,7 +501,10 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
|
|||
stream_putBits( stream, NAME_LEN_NBITS, len );
|
||||
stream_putBytes( stream, name, len );
|
||||
}
|
||||
|
||||
} else {
|
||||
XP_LOGF( "%s: wierd state %s; dropping message", __func__,
|
||||
getStateStr(server->nv.gameState) );
|
||||
}
|
||||
stream_destroy( stream );
|
||||
} /* server_initClientConnection */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue