diff --git a/xwords4/relay/states.cpp b/xwords4/relay/states.cpp index a69322659..915b9b034 100644 --- a/xwords4/relay/states.cpp +++ b/xwords4/relay/states.cpp @@ -82,6 +82,7 @@ StateTable g_stateTable[] = { { XWS_MISSING, XWE_DISCONNMSG, XWA_DISCONNECT, XWS_MISSING }, { XWS_ANY, XWE_NOMORESOCKETS, XWA_NONE, XWS_DEAD }, +{ XWS_ANY, XWE_SHUTDOWN, XWA_SHUTDOWN, XWS_DEAD }, { XWS_INITED, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 }, { XWS_MISSING, XWE_RECONNECTMSG, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 }, @@ -190,6 +191,7 @@ eventString( XW_RELAY_EVENT evt ) CASESTR(XWE_SOMEMISSING); CASESTR(XWE_OKTOSEND); CASESTR(XWE_COUNTSBAD); + CASESTR(XWE_SHUTDOWN); } assert(0); return ""; @@ -215,6 +217,7 @@ actString( XW_RELAY_ACTION act ) CASESTR(XWA_NOTIFYDISCON); CASESTR(XWA_REMOVESOCKET); CASESTR(XWA_HEARTDISCONN); + CASESTR(XWA_SHUTDOWN); } assert(0); return ""; diff --git a/xwords4/relay/states.h b/xwords4/relay/states.h index 5b85e060b..f9a3eb2b8 100644 --- a/xwords4/relay/states.h +++ b/xwords4/relay/states.h @@ -108,6 +108,8 @@ typedef enum { ,XWE_NOMORESOCKETS /* last socket's been removed */ + ,XWE_SHUTDOWN /* shutdown this game */ + ,XWE_ANY /* wildcard; matches all */ } XW_RELAY_EVENT; @@ -143,6 +145,8 @@ typedef enum { ,XWA_HEARTDISCONN + ,XWA_SHUTDOWN + } XW_RELAY_ACTION; int getFromTable( XW_RELAY_STATE curState, XW_RELAY_EVENT curEvent,