mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
drop-packet test got an assert because we assumed the effects of a
dropped packet. Instead, now treat the connection as broken and restart.
This commit is contained in:
parent
e122953fd5
commit
a96dfb57f6
1 changed files with 33 additions and 25 deletions
|
@ -1268,7 +1268,14 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID )
|
|||
srcID = (XWHostID)stream_getU8( stream );
|
||||
XP_ASSERT( comms->r.myHostID == HOST_ID_NONE
|
||||
|| comms->r.myHostID == srcID );
|
||||
|
||||
if ( 0 == comms->r.cookieID ) {
|
||||
XP_LOGF( "%s: cookieID still 0; most likely packet was lost",
|
||||
__func__ );
|
||||
comms_transportFailed( comms );
|
||||
} else {
|
||||
comms->r.myHostID = srcID;
|
||||
|
||||
XP_LOGF( "%s: set hostid: %x", __func__, comms->r.myHostID );
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1299,6 +1306,7 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID )
|
|||
comms->r.myHostID, XP_TRUE, 0 );
|
||||
}
|
||||
set_relay_state( comms, COMMS_RELAYSTATE_ALLCONNECTED );
|
||||
}
|
||||
break;
|
||||
case XWRELAY_MSG_FROMRELAY:
|
||||
cookieID = stream_getU16( stream );
|
||||
|
|
Loading…
Reference in a new issue