apns_simple 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apns_simple/client.rb +7 -2
- data/lib/apns_simple/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: 0e9d10c4b40b0eec209b3df3a4e4efd902d346e0
|
4
|
+
data.tar.gz: 545ce5885e94bab878faeb1ff11c030d89986fc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f923b01bae484adf92cc5b9919f4c1b9857f8db414a32ec8558cdc6e2fbb222b9cf215a3514fa546c9b8636abb43e46c92d4dea4ff9704b82c6647064af02dc
|
7
|
+
data.tar.gz: 71bbe0c86313f74c58f6ce27a500a06dd397f1549ca52f065564a13461eddbf2de4c23e7f5eb674a5f3f43b20f562c2b4b692b153a1617454cd6f0401b57aaef
|
data/lib/apns_simple/client.rb
CHANGED
@@ -50,12 +50,17 @@ module ApnsSimple
|
|
50
50
|
ssl.write(notification.payload)
|
51
51
|
ssl.flush
|
52
52
|
|
53
|
-
|
53
|
+
result = IO.select([ssl], nil, nil, TIMEOUT)
|
54
|
+
|
55
|
+
unless result
|
54
56
|
notification.error = "No response from APNS server received in #{TIMEOUT} seconds. Exit by timeout."
|
55
57
|
return
|
56
58
|
end
|
57
59
|
|
58
|
-
|
60
|
+
readables = result.first # Array of readable sockets.
|
61
|
+
readable_ssl_socket = readables.first # Find one and only socket we are watching.
|
62
|
+
|
63
|
+
if (error = readable_ssl_socket.read(6))
|
59
64
|
command, status, _index = error.unpack("ccN")
|
60
65
|
notification.error = command == COMMAND ? "#{status}: #{CODES[status]}" : "Unknown command received from APNS server: #{command}"
|
61
66
|
end
|
data/lib/apns_simple/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apns_simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Voronkov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|