summaryrefslogtreecommitdiffstats
path: root/src/OSSupport
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-08-14 22:19:15 +0200
committerMattes D <github@xoft.cz>2015-08-18 08:49:00 +0200
commitdd5201c29e4a9a889a70c81fa7a82bf0c8615d65 (patch)
treeb14ae581e0680c303466781cc356c2399a6c7990 /src/OSSupport
parentMerge pull request #2436 from cuberite/UpdateCompileScript (diff)
downloadcuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar.gz
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar.bz2
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar.lz
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar.xz
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.tar.zst
cuberite-dd5201c29e4a9a889a70c81fa7a82bf0c8615d65.zip
Diffstat (limited to 'src/OSSupport')
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index 6f0a1ee16..d1443757a 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -123,7 +123,7 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
// Set up the main socket:
// It should listen on IPv6 with IPv4 fallback, when available; IPv4 when IPv6 is not available.
bool NeedsTwoSockets = false;
- int err;
+ int err = 0;
evutil_socket_t MainSock = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
if (!IsValidSocket(MainSock))
@@ -271,6 +271,8 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
return true; // Report as success, the primary socket is working
}
+ UNUSED(err);
+
m_SecondaryConnListener = evconnlistener_new(cNetworkSingleton::Get().GetEventBase(), Callback, this, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, 0, SecondSock);
return true;
}