summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-09-28 13:47:30 +0200
committerGitHub <noreply@github.com>2017-09-28 13:47:30 +0200
commit2afe62952c52e9dc9cbd413db9a316ae4359c331 (patch)
tree9cd9523daa1b844c1a235674f8831113d522be41 /src/main.cpp
parent27eeb3581f5ee7183f326807c36afbe272b0d985 (diff)
downloadminetest-2afe62952c52e9dc9cbd413db9a316ae4359c331.tar.gz
minetest-2afe62952c52e9dc9cbd413db9a316ae4359c331.tar.bz2
minetest-2afe62952c52e9dc9cbd413db9a316ae4359c331.zip
Server: affect bind_addr on constructor instead of start() (#6474)
bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1a3c49658..792cd104d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -838,13 +838,13 @@ static bool run_dedicated_server(const GameParams &game_params, const Settings &
try {
// Create server
Server server(game_params.world_path, game_params.game_spec,
- false, bind_addr.isIPv6(), true, &iface);
+ false, bind_addr, true, &iface);
g_term_console.setup(&iface, &kill, admin_nick);
g_term_console.start();
- server.start(bind_addr);
+ server.start();
// Run server
dedicated_server_loop(server, kill);
} catch (const ModError &e) {
@@ -872,8 +872,8 @@ static bool run_dedicated_server(const GameParams &game_params, const Settings &
try {
// Create server
Server server(game_params.world_path, game_params.game_spec, false,
- bind_addr.isIPv6(), true);
- server.start(bind_addr);
+ bind_addr, true);
+ server.start();
// Run server
bool &kill = *porting::signal_handler_killstatus();