In my Client Side (Unity3d) , when my connection is Closed , Reconect Event doesnt fire.
Do you call the Stop method on client side to end the SignalR connection? If you’d like to make it to reconnect to the hub server, you can try to set a timer to wait a period of time and then call the Start method to establish a new connection after the
client disconnected.
With Regards,
Fei Han
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Do you call the Stop method on client side to end the SignalR connection?
when i say "my connection is closed", i mean i lost my internet (turned off Wifi), so , how can i call stop method? when there is no connection between server and client .
Fei Han - MSFT
you can try to set a timer to wait a period of time and then call the Start method to establish a new connection after the client
disconnected.
yes! i try this way, but there is a big problem:
when i call Start Method without connection between server and client, the Start Method doesnt Work fine, it's like an infinite loop, so i cant call this method again...
when i say "my connection is closed", i mean i lost my internet (turned off Wifi)
If you turn off the wifi for a long time, hub server detect the client is not active, the connection will be stopped, and it will not reconnect automatically. The new connection will be established when the client application starts.
With Regards,
Fei Han
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
2 Posts
SignalR doesn't Reconnect in Unity3D Client
Mar 19, 2018 05:16 PM|Vergilooos|LINK
i cant find any sample for this subject.
anyway, In my Client Side (Unity3d) , when my connection is Closed , Reconect Event doesnt fire.
what can we do ?
All-Star
40565 Points
6233 Posts
Microsoft
Re: SignalR doesn't Reconnect in Unity3D Client
Mar 20, 2018 07:49 AM|Fei Han - MSFT|LINK
Hi Vergilooos,
Do you call the Stop method on client side to end the SignalR connection? If you’d like to make it to reconnect to the hub server, you can try to set a timer to wait a period of time and then call the Start method to establish a new connection after the client disconnected.
With Regards,
Fei Han
None
0 Points
2 Posts
Re: SignalR doesn't Reconnect in Unity3D Client
Mar 25, 2018 12:33 PM|Vergilooos|LINK
Hi
Tnx Fei Han,
when i say "my connection is closed", i mean i lost my internet (turned off Wifi), so , how can i call stop method? when there is no connection between server and client .
yes! i try this way, but there is a big problem:
when i call Start Method without connection between server and client, the Start Method doesnt Work fine, it's like an infinite loop, so i cant call this method again...
All-Star
40565 Points
6233 Posts
Microsoft
Re: SignalR doesn't Reconnect in Unity3D Client
Apr 05, 2018 04:45 AM|Fei Han - MSFT|LINK
Hi Vergilooos,
If you turn off the wifi for a long time, hub server detect the client is not active, the connection will be stopped, and it will not reconnect automatically. The new connection will be established when the client application starts.
With Regards,
Fei Han