Skip to content

Commit 912970c

Browse files
Drop default timeout for Socket#connect on Windows (#14756)
IIRC the default timeout of was added when the IOCP event loop did not allow an unlimited timeout. This is possible now, and we can remove the workaround.
1 parent 736f04c commit 912970c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crystal/system/win32/socket.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ module Crystal::System::Socket
146146
return nil
147147
end
148148

149-
operation.wait_for_wsa_result(read_timeout || 1.seconds) do |error|
149+
operation.wait_for_wsa_result(read_timeout) do |error|
150150
case error
151151
when .wsa_io_incomplete?, .wsaeconnrefused?
152152
return ::Socket::ConnectError.from_os_error(method, error)

0 commit comments

Comments
 (0)