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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5b976dfea9f0cdbd07d3f25bfae55c230d26fd9
4
- data.tar.gz: 10240a3b20378e17b9af022fef1e3bc7f27a29c2
3
+ metadata.gz: 1955b43fbf000cce65133a3015187ae3cb5e0c58
4
+ data.tar.gz: 9a59c68c30a5fd7f544ff28ce45e348b185ee55e
5
5
  SHA512:
6
- metadata.gz: 71c89932e7a8a378d4386eb5885e66224afc9b25d22f4edda43a0382398cb434570dbfb140cdb706067e35cb728307a1b3030bf1a24fc9a93b411b5abd872f3b
7
- data.tar.gz: 5eca04bf84b8e02ef677b2069c962b3429bf8906aa4f67ce7c66ba3e60d7c7be32095c2719b99df4f0ad67bf2804fa708c211781aaa9e21e82ecd1485a1d60c7
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, &block))
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, &block))
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[0][3])
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][0]), Socket::SOCK_STREAM, 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
@@ -1,5 +1,5 @@
1
1
  module Net
2
2
  class TCPClient #:nodoc
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
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.1
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-03 00:00:00.000000000 Z
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.