Server Performance boost
The Servers Performance was up to 100% percent. Tried to close threads not needed directly. now it is under 1% (Threads stacking, when errors)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -66,6 +67,8 @@ public class StartHandler : MonoBehaviour
|
||||
PlayerPrefs.Save();
|
||||
|
||||
layout2.GetComponentInChildren<TMP_Text>().text = "Your room code is: \n" + code;
|
||||
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
public void ButtonJoin()
|
||||
@@ -152,4 +155,10 @@ public class StartHandler : MonoBehaviour
|
||||
layout0.SetActive(true);
|
||||
layout1.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
Stream stream = client.GetStream();
|
||||
stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user