this fixes #3602, incompatabilities TBD

git-svn-id: file:///home/svn/framework3/trunk@11075 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-11-19 22:28:35 +00:00
parent eab8c24b8b
commit b5c5e21b24
1 changed files with 6 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class Rex::Socket::Comm::Local
sock.bind(Rex::Socket.to_sockaddr(param.localhost, param.localport))
rescue Errno::EADDRINUSE
rescue ::Errno::EADDRNOTAVAIL,::Errno::EADDRINUSE
sock.close
raise Rex::AddressInUse.new(param.localhost, param.localport), caller
end
@ -242,9 +242,13 @@ class Rex::Socket::Comm::Local
raise ::Errno::ETIMEDOUT
end
rescue ::Errno::EHOSTUNREACH,::Errno::ENETDOWN,::Errno::ENETUNREACH,::Errno::ENETRESET,::Errno::EHOSTDOWN,::Errno::EACCES,::Errno::EINVAL,::Errno::EADDRNOTAVAIL
rescue ::Errno::EHOSTUNREACH,::Errno::ENETDOWN,::Errno::ENETUNREACH,::Errno::ENETRESET,::Errno::EHOSTDOWN,::Errno::EACCES,::Errno::EINVAL
sock.close
raise Rex::HostUnreachable.new(param.peerhost, param.peerport), caller
rescue ::Errno::EADDRNOTAVAIL,::Errno::EADDRINUSE
sock.close
raise Rex::AddressInUse.new(param.peerhost, param.peerport), caller
rescue Errno::ETIMEDOUT
sock.close