net_tcp_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/net/tcp_client/logging.rb +2 -2
- data/lib/net/tcp_client/tcp_client.rb +3 -3
- data/lib/net/tcp_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1955b43fbf000cce65133a3015187ae3cb5e0c58
|
4
|
+
data.tar.gz: 9a59c68c30a5fd7f544ff28ce45e348b185ee55e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b87f0dfdf9a5662411bbde05c2c9ddb04ee74f0d7bd915a1d67db404165fd5398bcc0c4df28043846038571586ed2d842446da95170f437790e5c31e8e807840
|
7
|
+
data.tar.gz: e3e3810825b828d2e474f6785f047f0ca64a301ce628fc5cfc0e696e22315b477a5413639bdc4b51634032a77d9a8b54c2c4ed6134db6fc92066cd96acce508d
|
@@ -135,11 +135,11 @@ module Net
|
|
135
135
|
else
|
136
136
|
logged_exception = nil
|
137
137
|
end
|
138
|
-
send(level, format_log_message(level, message, payload, logged_exception, duration
|
138
|
+
send(level, format_log_message(level, message, payload, logged_exception, duration))
|
139
139
|
raise exception
|
140
140
|
elsif duration >= min_duration
|
141
141
|
# Only log if the block took longer than 'min_duration' to complete
|
142
|
-
send(level, format_log_message(level, message, payload, logged_exception, duration
|
142
|
+
send(level, format_log_message(level, message, payload, logged_exception, duration))
|
143
143
|
end
|
144
144
|
end
|
145
145
|
end
|
@@ -512,11 +512,11 @@ module Net
|
|
512
512
|
host_name, port = server.split(":")
|
513
513
|
port = port.to_i
|
514
514
|
|
515
|
-
address = Socket.getaddrinfo(host_name, nil, Socket::AF_INET)
|
516
|
-
socket_address = Socket.pack_sockaddr_in(port, address[
|
515
|
+
address = Socket.getaddrinfo(host_name, nil, Socket::AF_INET, Socket::SOCK_STREAM).sample
|
516
|
+
socket_address = Socket.pack_sockaddr_in(port, address[3])
|
517
517
|
|
518
518
|
begin
|
519
|
-
@socket = Socket.new(Socket.const_get(address[0]
|
519
|
+
@socket = Socket.new(Socket.const_get(address[0]), Socket::SOCK_STREAM, 0)
|
520
520
|
@socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) unless buffered
|
521
521
|
if @connect_timeout == -1
|
522
522
|
# Timeout of -1 means wait forever for a connection
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net_tcp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Net::TCPClient implements resilience features that many developers wish
|
14
14
|
was already included in the standard Ruby libraries.
|