-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity Example Bug : Client Cannot Reconnect After Exceed 5 Sec No Received Disconnect #547
Comments
@SinForLove can you send additional information like logs, how you reconnecting or DisconnectReason details? |
I just use git default unity example and not do any change. I disable the server script and build to android phone as a client, on PC I enable the server script and disable client script as server . Start the server and client on a same wireless router.After they connect success ,I put client app to background and keep about 5 sec , server logs"a peer disconnected as Timeout". Then I put client app back to front , server start logs "[SERVER] Received discovery request. Send discovery response" every frame, and cannot reconnect any more... |
@SinForLove replace LiteNetLib.dll in example with library sources. This is needed thing for android/ios
|
I replace LiteNetLib.dll but still the same. I resolve it by adding a script in OnApplicationFocuse to reopen client NetManager when client from back to front. So I guess it's because the thread used to receive messages has been closed when the program moves from the foreground to the background. |
Unity example use broadcast to send discovery connect , it works when first connect. But after one or more reconnect it doesn't not work no longer. Client send discover request and server received, but when server reply the connect request client cannot receive the request. please help!!!!!
The text was updated successfully, but these errors were encountered: