Fixed server socket being closed after a restart.
Prevents a bug where multiple program instances can be run. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
44bdf70c98
commit
71edef2fa9
|
@ -74,8 +74,10 @@ public class Container extends AppGameContainer {
|
|||
}
|
||||
}
|
||||
|
||||
if (forceExit)
|
||||
if (forceExit) {
|
||||
Opsu.closeSocket();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,9 +87,6 @@ public class Container extends AppGameContainer {
|
|||
// save user options
|
||||
Options.saveOptions();
|
||||
|
||||
// close server socket
|
||||
Opsu.closeSocket();
|
||||
|
||||
// destroy images
|
||||
InternalTextureLoader.get().clear();
|
||||
|
||||
|
|
|
@ -160,6 +160,9 @@ public class Opsu extends StateBasedGame {
|
|||
else
|
||||
ErrorHandler.error("Error while creating game container.", e, true);
|
||||
}
|
||||
|
||||
// close server socket
|
||||
closeSocket();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user