dispose the previous ordermanager (so the file will get closed, among other things)
This commit is contained in:
@@ -170,8 +170,11 @@ namespace OpenRA
|
||||
|
||||
internal static void JoinServer(string host, int port)
|
||||
{
|
||||
if (orderManager != null) orderManager.Dispose();
|
||||
|
||||
CurrentHost = host;
|
||||
CurrentPort = port;
|
||||
|
||||
orderManager = new OrderManager(new NetworkConnection( host, port ), ChooseReplayFilename());
|
||||
}
|
||||
|
||||
@@ -182,6 +185,7 @@ namespace OpenRA
|
||||
|
||||
internal static void JoinLocal()
|
||||
{
|
||||
if (orderManager != null) orderManager.Dispose();
|
||||
orderManager = new OrderManager(new EchoConnection());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user