diff --git a/lib/io/endpoint/wrapper.rb b/lib/io/endpoint/wrapper.rb index a2adba4..00e66e3 100644 --- a/lib/io/endpoint/wrapper.rb +++ b/lib/io/endpoint/wrapper.rb @@ -157,6 +157,13 @@ def bind(local_address, protocol: 0, reuse_address: true, reuse_port: nil, linge socket.listen(backlog) rescue Errno::EOPNOTSUPP # Ignore. + rescue Errno::EACCES + # Unfortunately, in some environments, the error gets translated to "permission denied" instead. + if local_address.socktype == ServerSocket::SOCK_DGRAM + # Ignore + else + raise + end end end rescue