kw_apn 0.3 → 0.3.1

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/sender.rb +4 -2
  3. metadata +4 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3
1
+ 0.3.1
data/lib/sender.rb CHANGED
@@ -64,8 +64,10 @@ private
64
64
  end
65
65
 
66
66
  def perform_batch(notifications, index=0)
67
+ counter = 0
67
68
  begin
68
69
  notifications[index..-1].each_with_index do |n, i|
70
+ counter = i
69
71
  n.identifier = i + index + ID_OFFSET
70
72
  bytes = @ssl.write(n.to_s)
71
73
  if bytes <= 0
@@ -78,8 +80,8 @@ private
78
80
  if @last_error_index.nil?
79
81
  # stop watchthread as the connection should be allready down
80
82
  @watch_thread.exit
81
- self.class.log("(#{session_id}) Exception at index #{i+index}: #{e.message}")
82
- @failed_index_array << (i+index)
83
+ self.class.log("(#{session_id}) Exception at index #{counter+index}: #{e.message}")
84
+ @failed_index_array << (counter+index)
83
85
  failed
84
86
  else
85
87
  # should be interrupted by watchthread, do nothing wait for restart
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kw_apn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- version: "0.3"
9
+ - 1
10
+ version: 0.3.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Jonathan Cichon
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-08-10 00:00:00 +02:00
19
+ date: 2010-08-15 00:00:00 +02:00
19
20
  default_executable:
20
21
  dependencies: []
21
22