don't loop forever on server_do(). It's broken w.r.t. guaranteeing

that it can always change state.
This commit is contained in:
Andy2 2011-08-17 06:52:04 -07:00
parent 30145deba7
commit 8148c7699a

View file

@ -1011,16 +1011,16 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
result = comms_checkIncomingStream( state->game.comms, stream, NULL );
if ( result ) {
ServerCtxt* server = state->game.server;
XP_Bool notDone;
/* XP_Bool notDone; */
/* in case work's pending */
for ( notDone = XP_TRUE; notDone; ) {
server_do( server, &notDone );
}
/* for ( notDone = XP_TRUE; notDone; ) { */
(void)server_do( server, NULL );
/* } */
(void)server_receiveMessage( server, stream );
/* in case MORE work's pending */
for ( notDone = XP_TRUE; notDone; ) {
server_do( server, &notDone );
}
/* for ( notDone = XP_TRUE; notDone; ) { */
(void)server_do( server, NULL );
/* } */
}
stream_destroy( stream );