call server_do before passing message to server to give it a chance to

get any pending work done.
This commit is contained in:
Andy2 2011-07-04 12:37:23 -07:00 committed by Andy2
parent 52510b0b10
commit 6b773460ec

View file

@ -1003,7 +1003,9 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
jstream ); jstream );
result = comms_checkIncomingStream( state->game.comms, stream, NULL ); result = comms_checkIncomingStream( state->game.comms, stream, NULL );
if ( result ) { if ( result ) {
(void)server_receiveMessage( state->game.server, stream ); ServerCtxt* server = state->game.server;
server_do( server ); /* in case work's pending */
(void)server_receiveMessage( server, stream );
} }
stream_destroy( stream ); stream_destroy( stream );