Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: savely00 on January 17, 2014, 12:29:14 AM
-
I am working on PC based multi-player game. Sometimes during the game the TNServer crashes. I tried to use OnNetworkDisconnect and OnNetworkError but I do not receive notifications. I placed the script with the following fragment on the MainCamera. Please Help.
..........................................................................................
disconnect = false;
void OnNetworkDisconnect() { disconnect = true; }
void OnNetworkError (string error) { disconnect = true; }
void OnGUI () {
if (disconnect)
{ GUI.Label(new Rect(10, 10, 105, 40), "DISCONNECTED"); }
}
-
What crashes? If the application crashes, there won't be any OnGUI, so I'm guessing it's the remote client that crashes? So what are you seeing, the 2nd player remains connected? You need to be more precise here. The connection will be kept for up to 10 seconds before TNet realizes that it's no longer active and sends the disconnection message.
-
Sorry. TNServer crashes. To reproduce, I start two TNServer and two instances. After both instances are initialized I kill the TNServer. None of the instances receive the notification. Note: I run both instances as well as TNServer on the same machine.
-
So... does it crash, or do you kill it? As they are not one and the same. ;)
TNServer.exe is stable as a rock from my experience. Starlink had two TNServers running (one lobby server and one game server) for the past 7 months without any issues. That's 7 months up-time of players coming and going. If you do manage to crash it somehow, I'd be interested to know how so I can fix it. If you kill it... that's a different story. As I mentioned, the TNet clients should realize that the connection is dead after ~10 seconds.
-
ArenMook,
We are working on a multi-player game where it make sense to run multiple instances of the game on one machine. We have active players, that usually run on separate machines, and we have passive instances (PTZ cameras). When we ran multiple cameras on one machine, resource use is going crazy and processor overheats :-[. Usually server crashes in those conditions. But computer is not crashing. We noticed that we do not receive notification in the active player instances that TNServer has crashed.
For testing purposes I kill TNServer intentionally. I still do not receive the notification even after 5 minutes.
-
Alright, I'll see if I can repro it on my end.