File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ class SSL < Socket
54
54
# @since 2.0.0
55
55
def connect!
56
56
Timeout . timeout ( timeout , Error ::SocketTimeoutError ) do
57
- @tcp_socket . connect ( ::Socket . pack_sockaddr_in ( port , host ) )
57
+ handle_errors { @tcp_socket . connect ( ::Socket . pack_sockaddr_in ( port , host ) ) }
58
58
@socket = OpenSSL ::SSL ::SSLSocket . new ( @tcp_socket , context )
59
59
@socket . sync_close = true
60
- @socket . connect
60
+ handle_errors { @socket . connect }
61
61
verify_certificate! ( @socket )
62
62
self
63
63
end
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class TCP < Socket
43
43
def connect!
44
44
Timeout . timeout ( timeout , Error ::SocketTimeoutError ) do
45
45
socket . setsockopt ( IPPROTO_TCP , TCP_NODELAY , 1 )
46
- socket . connect ( ::Socket . pack_sockaddr_in ( port , host ) )
46
+ handle_errors { socket . connect ( ::Socket . pack_sockaddr_in ( port , host ) ) }
47
47
self
48
48
end
49
49
end
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class Unix < Socket
39
39
# @since 2.0.0
40
40
def connect!
41
41
Timeout . timeout ( timeout , Error ::SocketTimeoutError ) do
42
- socket . connect ( path )
42
+ handle_errors { socket . connect ( path ) }
43
43
self
44
44
end
45
45
end
You can’t perform that action at this time.
0 commit comments