DarkRiftNetworking / DarkRift

DarkRift Networking by Unordinal
http://darkriftnetworking.com
Other
222 stars 66 forks source link

Freezing/Crashing when sending message from server immediately upon client connecting #91

Open adanub opened 5 years ago

adanub commented 5 years ago

Quick Description

The client (in editor, haven't tested build) freezes if the server returns a message immediately upon the client connecting to it. Doesn't happen 100% of the time.

Explanation

Current workaround is to delay sending messages for a second or so after client connects. Even if this isn't something that can be fixed (quite likely), there needs to be some form of error handling for this, such as cancelling the message and throwing error/warning messages, and/or internally delaying messages that are sent immediately upon connection, or perhaps delaying the connection event as it seems possible that it is being called too early without the connection actually being complete on both client and server.

Conditions

This was found using embedded unity server, with client running in editor mode. Have not tested with built client, may or may not occur there. Both server and client running locally on the same machine (Win 10). Have not tested it over separate machines or networks.

Reproduction

JamJar00 commented 5 years ago

Thanks for the clear write up!

Can you tell me what Unity versions/DarkRift versions you're using so I can make sure my environment is the same please?

Jamie

adanub commented 5 years ago

Unity 2018.2.15f1 Darkrift 2.3.1