From: Matthew Endsley Date: Wed, 3 Feb 2021 09:14:36 +0000 (-0800) Subject: Initialize the keep-alive timer before sending packets X-Git-Tag: 1.0.0~20^2~11 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=ade3e5d292c888d5a1492f1580b694870eafab59;p=rhonda%2Fimpostor.hazel.git Initialize the keep-alive timer before sending packets --- diff --git a/Hazel/Udp/UnityUdpClientConnection.cs b/Hazel/Udp/UnityUdpClientConnection.cs index 19256ab..eb9264b 100644 --- a/Hazel/Udp/UnityUdpClientConnection.cs +++ b/Hazel/Udp/UnityUdpClientConnection.cs @@ -135,14 +135,14 @@ namespace Hazel.Udp throw new HazelException("A SocketException occurred while initiating a receive operation.", e); } + this.InitializeKeepAliveTimer(); + // Write bytes to the server to tell it hi (and to punch a hole in our NAT, if present) // When acknowledged set the state to connected SendHello(bytes, () => { this.State = ConnectionState.Connected; }); - - this.InitializeKeepAliveTimer(); } ///