Skip to content

Commit cbcfeea

Browse files
committed
Fix setting blocking mode on unconnected socket
1 parent cae9ffa commit cbcfeea

File tree

1 file changed

+1
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/socket

1 file changed

+1
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/socket/SocketBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ private static void doConnect(PSocket socket, Object[] hostAndPort) throws IOExc
217217
InetSocketAddress socketAddress = new InetSocketAddress((String) hostAndPort[0], (Integer) hostAndPort[1]);
218218
SocketChannel channel = SocketChannel.open();
219219
channel.connect(socketAddress);
220+
channel.configureBlocking(socket.isBlocking());
220221
socket.setSocket(channel);
221222
}
222223
}

0 commit comments

Comments
 (0)