From bd53824d9587e997549c1e1ab80f3b18146907eb Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 22 Aug 2020 20:34:43 -0700 Subject: [PATCH] replace assert fail with message rejection Some relay bug (I think) misroutes or duplicates packets. Don't assert as that means test scripts fail to finish. Instead drop the message. Scripts seem to recover ok with this change and I've never seen the assert on a device so suspect it's test-world only --- xwords4/common/server.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xwords4/common/server.c b/xwords4/common/server.c index 2da179148..463a1f738 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -3886,13 +3886,12 @@ handleIllegalWord( ServerCtxt* server, XWEnv xwe, XWStreamCtxt* incoming ) static XP_Bool handleMoveOk( ServerCtxt* server, XWEnv xwe, XWStreamCtxt* XP_UNUSED(incoming) ) { - XP_Bool accepted = XP_TRUE; XP_ASSERT( server->vol.gi->serverRole == SERVER_ISCLIENT ); - XP_ASSERT( server->nv.gameState == XWSTATE_MOVE_CONFIRM_WAIT ); - - SETSTATE( server, XWSTATE_INTURN ); - nextTurn( server, xwe, PICK_CUR ); - + XP_Bool accepted = server->nv.gameState == XWSTATE_MOVE_CONFIRM_WAIT; + if ( accepted ) { + SETSTATE( server, XWSTATE_INTURN ); + nextTurn( server, xwe, PICK_CUR ); + } return accepted; } /* handleMoveOk */