mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-14 08:01:38 +01:00
Send notification when device disconnnects without closing socket (in
addition to the existing one sent when a socket is closed).
This commit is contained in:
parent
1da25307e5
commit
b219e8b279
2 changed files with 4 additions and 1 deletions
|
@ -536,6 +536,8 @@ CookieRef::handleEvents()
|
||||||
case XWA_DISCONNECT:
|
case XWA_DISCONNECT:
|
||||||
setAllConnectedTimer();
|
setAllConnectedTimer();
|
||||||
reducePlayerCounts( evt.u.discon.socket );
|
reducePlayerCounts( evt.u.discon.socket );
|
||||||
|
notifyOthers( evt.u.discon.socket, XWRELAY_DISCONNECT_OTHER,
|
||||||
|
XWRELAY_ERROR_OTHER_DISCON );
|
||||||
removeSocket( evt.u.discon.socket );
|
removeSocket( evt.u.discon.socket );
|
||||||
/* Don't notify. This is a normal part of a game ending. */
|
/* Don't notify. This is a normal part of a game ending. */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -119,7 +119,8 @@ enum {
|
||||||
,XWRELAY_ERROR_HEART_YOU /* Haven't heard from somebody in too long */
|
,XWRELAY_ERROR_HEART_YOU /* Haven't heard from somebody in too long */
|
||||||
,XWRELAY_ERROR_HEART_OTHER /* Haven't heard from other in too long */
|
,XWRELAY_ERROR_HEART_OTHER /* Haven't heard from other in too long */
|
||||||
,XWRELAY_ERROR_LOST_OTHER /* Generic other-left-we-dunno-why error */
|
,XWRELAY_ERROR_LOST_OTHER /* Generic other-left-we-dunno-why error */
|
||||||
|
,XWRELAY_ERROR_OTHER_DISCON /* The other guy disconnected, maybe to start
|
||||||
|
a new game? */
|
||||||
,XWRELAY_ERROR_LASTERR
|
,XWRELAY_ERROR_LASTERR
|
||||||
}
|
}
|
||||||
#ifndef CANT_DO_TYPEDEF
|
#ifndef CANT_DO_TYPEDEF
|
||||||
|
|
Loading…
Reference in a new issue