Performance Boost
MinigamesClient.currentInstance.Close(); Correctly Ends all streams from the mini game
This commit is contained in:
@@ -13,9 +13,13 @@ public class MinigamesClient : MonoBehaviour
|
||||
private Stream stream;
|
||||
|
||||
private Queue<Job> jobs = new Queue<Job>();
|
||||
|
||||
public static MinigamesClient currentInstance;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
currentInstance = this;
|
||||
|
||||
client = new TcpClient("185.245.96.48", 8051);
|
||||
stream = client.GetStream();
|
||||
|
||||
@@ -55,4 +59,10 @@ public class MinigamesClient : MonoBehaviour
|
||||
jobs.Enqueue(new Job(read));
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
stream.Close();
|
||||
client.Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user