garru-ruby_scribe_client 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/ruby_scribe_client.gemspec +1 -1
- data/vendor/thrift/transport/socket.rb +6 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
data/ruby_scribe_client.gemspec
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
#
|
9
9
|
require 'thrift/transport'
|
10
10
|
require 'socket'
|
11
|
+
require 'timeout'
|
11
12
|
|
12
13
|
module Thrift
|
13
14
|
class Socket < Transport
|
@@ -23,7 +24,11 @@ module Thrift
|
|
23
24
|
|
24
25
|
def open
|
25
26
|
begin
|
26
|
-
|
27
|
+
status = Timeout::timeout(@timeout) {
|
28
|
+
@handle = TCPSocket.new(@host, @port)
|
29
|
+
}
|
30
|
+
rescue Timeout::Error
|
31
|
+
raise TransportException.new(TransportException::TIMED_OUT, "Could not connect to #{@desc}")
|
27
32
|
rescue StandardError
|
28
33
|
raise TransportException.new(TransportException::NOT_OPEN, "Could not connect to #{@desc}")
|
29
34
|
end
|