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
Connect to server from unity client, running in the editor.
On the server, upon receiving the connection event, immediately send a message. Contents of the message can be anything, even empty.
The client freezes (not 100%, may need multiple attempts for it to happen).
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