Socket: Fix reuseaddr / bind ordering
g0dil [Thu, 20 Mar 2008 17:23:57 +0000 (17:23 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@753 270642c3-0616-0410-b53a-bc976706d245

Socket/Protocols/INet/TCPSocketHandle.cc

index b52cf4c..39af9cf 100644 (file)
@@ -72,8 +72,8 @@ prefix_ void senf::TCPv4SocketProtocol::init_server(INet4SocketAddress const & a
     const
 {
     init_server();
-    serverHandle().bind(address);
     reuseaddr(true);
+    serverHandle().bind(address);
     if (::listen(fd(),backlog) < 0)
         SENF_THROW_SYSTEM_EXCEPTION("");
 }