Skip to content

Commit

Permalink
fix rare disconnect by timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Jun 21, 2016
1 parent aabc670 commit 78589d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LiteNetLib/NetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ private void ProcessConnectAccept()
return;

NetUtils.DebugWrite(ConsoleColor.Cyan, "[NC] Received connection accept");
_peer.StartConnectionTimer();
_connected = true;
var connectEvent = CreateEvent(NetEventType.Connect);
connectEvent.Peer = _peer;
EnqueueEvent(connectEvent);
_peer.StartConnectionTimer();
}

protected override void ReceiveFromSocket(byte[] reusableBuffer, int count, NetEndPoint remoteEndPoint)
Expand Down

0 comments on commit 78589d9

Please sign in to comment.