remove extra (server-only) setsockopt(SO_REUSEADDR)

git-svn-id: file:///home/svn/framework3/trunk@6023 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2008-12-19 08:02:53 +00:00
parent 248f1e9fc3
commit 84b6d9daf4
1 changed files with 1 additions and 5 deletions

View File

@ -125,11 +125,7 @@ class Rex::Socket::Comm::Local
# Bind to a given local address and/or port if they are supplied
if (param.localhost || param.localport)
begin
if (param.server?)
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_REUSEADDR, 1)
end
sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_REUSEADDR, true)
sock.bind(Rex::Socket.to_sockaddr(param.localhost, param.localport))