mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-29 10:26:36 +01:00
call server_do() up to five times to allow some extra work to get
done. Required if a host is also a robot.
This commit is contained in:
parent
b9be2b45f4
commit
08789c4097
1 changed files with 10 additions and 4 deletions
|
@ -1017,10 +1017,16 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1receiveMessage
|
|||
(void)server_do( server, NULL );
|
||||
/* } */
|
||||
(void)server_receiveMessage( server, stream );
|
||||
/* in case MORE work's pending */
|
||||
/* for ( notDone = XP_TRUE; notDone; ) { */
|
||||
(void)server_do( server, NULL );
|
||||
/* } */
|
||||
/* in case MORE work's pending. Multiple calls are required in at
|
||||
least one case, where I'm a host handling client registration *AND*
|
||||
I'm a robot. Only one server_do and I'll never make that first
|
||||
robot move. That's because comms can't detect a duplicate initial
|
||||
packet (in validateInitialMessage()). */
|
||||
int ii;
|
||||
XP_Bool notDone;
|
||||
for ( ii = 0, notDone = XP_TRUE; notDone && ii < 5; ++ii ) {
|
||||
(void)server_do( server, ¬Done );
|
||||
}
|
||||
}
|
||||
|
||||
stream_destroy( stream );
|
||||
|
|
Loading…
Reference in a new issue