mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +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_do( server, NULL );
|
||||||
/* } */
|
/* } */
|
||||||
(void)server_receiveMessage( server, stream );
|
(void)server_receiveMessage( server, stream );
|
||||||
/* in case MORE work's pending */
|
/* in case MORE work's pending. Multiple calls are required in at
|
||||||
/* for ( notDone = XP_TRUE; notDone; ) { */
|
least one case, where I'm a host handling client registration *AND*
|
||||||
(void)server_do( server, NULL );
|
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 );
|
stream_destroy( stream );
|
||||||
|
|
Loading…
Reference in a new issue