willardf / Hazel-Networking

Hazel Networking is a low level networking library for C# providing connection-oriented, message-based communication via RUDP.
MIT License
385 stars 60 forks source link

Rearrange ResentPacketsIfNeeded in UnityUdpClientConnection #34

Closed willardf closed 2 years ago

willardf commented 2 years ago

This makes it not block ManageReliablePackets should it fail. This can help get past some initial handshake failures.

NullReferenceException: Object reference not set to an instance of an object.
  at Hazel.Dtls.DtlsUnityConnection.SendClientKeyExchangeFlight (System.Boolean isRetransmit) [0x00000] in <00000000000000000000000000000000>:0 
  at Hazel.Dtls.DtlsUnityConnection.ResendPacketsIfNeeded () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Security.Cryptography.X509Certificates.X509Certificate2.get_SerialNumber () [0x00000] in <00000000000000000000000000000000>:0 
Mukikaizoku commented 2 years ago

The DtlsConnection already takes a logger, so it might be a light add to add it to the parent class at hand

willardf commented 2 years ago

Haha, I knew you were gonna bring it up. It's not a light add just because it'll hit all the tests, but it's the right thing to do so I guess I will.

Mukikaizoku commented 2 years ago

Hahah yeah, it was a bit of plumbing, but glad you did it, thanks! And looks good to me, approving!