mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 03:39:42 +00:00
Add one more command server fix so it still works correctly on Windows and reeanble the command server by default.
This commit is contained in:
parent
57de436db4
commit
a638c330ec
2 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,7 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
( "debug", "debug mode" )
|
||||
( "script-verbose", "verbose script output" )
|
||||
( "new-game", "activate char gen/new game mechanics" )
|
||||
( "enable-command-server", "turn on the command server" )
|
||||
( "disable-command-server", "turn off the command server" )
|
||||
;
|
||||
|
||||
bpo::variables_map variables;
|
||||
|
@ -64,7 +64,7 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
if (variables.count ("new-game"))
|
||||
engine.setNewGame();
|
||||
|
||||
if (variables.count("enable-command-server"))
|
||||
if (variables.count("disable-command-server") == 0)
|
||||
engine.enableCommandServer();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace OMW { namespace CommandServer { namespace Detail {
|
|||
void Connection::stop()
|
||||
{
|
||||
mSocket.shutdown(boost::asio::socket_base::shutdown_both);
|
||||
mSocket.close();
|
||||
mpThread->join();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue