mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
fixed bug with simultaneous disconnects not dispatching events
This commit is contained in:
parent
cfb05d051b
commit
7691ccc318
1 changed files with 1 additions and 1 deletions
|
@ -764,7 +764,7 @@ enet_protocol_handle_disconnect (ENetHost * host, ENetPeer * peer, const ENetPro
|
|||
|
||||
enet_peer_reset_queues (peer);
|
||||
|
||||
if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED)
|
||||
if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING)
|
||||
enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE);
|
||||
else
|
||||
if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)
|
||||
|
|
Loading…
Reference in a new issue