net-ntp 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/lib/net/ntp/ntp.rb +6 -6
- data/lib/net/ntp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e391926dc39cebfa6e634f05308415da6595dbd
|
4
|
+
data.tar.gz: 2d8d9b84ad5429000b54ff25f0531e1a79c3b60b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 379450ac396f01f8747e777dfcfafd0e8dc9186f65b01771aee7d514a77f09245a7812f3bba1356c4fd7e4897ef1c410482e70e9a92d05ee2527e1ff6e45a013
|
7
|
+
data.tar.gz: c9d0761066df5893b47d9e151ccacf0546aff341f710f46df509fe5806caec42eab2fa11a81833c5cd182897bb7fbed59546711242415cf1a614f88a4c97f649
|
data/Rakefile
CHANGED
data/lib/net/ntp/ntp.rb
CHANGED
@@ -77,14 +77,14 @@ module Net #:nodoc:
|
|
77
77
|
sock.flush
|
78
78
|
|
79
79
|
read, write, error = IO.select [sock], nil, nil, timeout
|
80
|
-
if read
|
81
|
-
client_time_receive = Time.now.to_f
|
82
|
-
data, _ = sock.recvfrom(960)
|
83
|
-
Response.new(data, client_time_receive)
|
84
|
-
else
|
80
|
+
if read.nil?
|
85
81
|
# For backwards compatibility we throw a Timeout error, even
|
86
82
|
# though the timeout is being controlled by select()
|
87
83
|
raise Timeout::Error
|
84
|
+
else
|
85
|
+
client_time_receive = Time.now.to_f
|
86
|
+
data, _ = sock.recvfrom(960)
|
87
|
+
Response.new(data, client_time_receive)
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
@@ -103,7 +103,7 @@ module Net #:nodoc:
|
|
103
103
|
class Response
|
104
104
|
|
105
105
|
attr_reader :client_time_receive
|
106
|
-
|
106
|
+
|
107
107
|
def initialize(raw_data, client_time_receive)
|
108
108
|
@raw_data = raw_data
|
109
109
|
@client_time_receive = client_time_receive
|
data/lib/net/ntp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ntp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerome Waibel
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: This project was a rubyfied version of perl's Net::NTP module, (C) 2004
|
16
16
|
by James G. Willmore. It provides a method to query an NTP server as specified in
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
49
|
rubyforge_project:
|
50
|
-
rubygems_version: 2.
|
50
|
+
rubygems_version: 2.4.5
|
51
51
|
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: NTP client for ruby.
|