Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tompesman committed Nov 20, 2015
2 parents 062a8b8 + db87994 commit d0e3fcf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.1.1
ruby-2.2.2
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: ruby
rvm:
- 2.2.2
- 2.1.1
- 2.0.0
- 1.9.3
2 changes: 1 addition & 1 deletion lib/pushr-apns/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module PushrApns
VERSION = '1.0.2'
VERSION = '1.0.3'
end
11 changes: 9 additions & 2 deletions lib/pushr/daemon/apns_support/connection_apns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,15 @@ def check_for_error(notification)
if tuple = read(ERROR_TUPLE_BYTES)
_, code, notification_id = tuple.unpack('ccN')

description = APN_ERRORS[code.to_i] || 'Unknown error. Possible push bug?'
error = Pushr::Daemon::DeliveryError.new(code, notification, description, 'APNS')
if code.to_i == 8
Pushr::FeedbackApns.create(app: @configuration.app, device: notification.device, follow_up: 'delete',
failed_at: Time.now)
Pushr::Daemon.logger.info("[#{@name}] Invalid device (error 8), feedback sent, message delivery failed"\
" to #{notification.to_json}")
else
description = APN_ERRORS[code.to_i] || 'Unknown error. Possible push bug?'
error = Pushr::Daemon::DeliveryError.new(code, notification, description, 'APNS')
end
else
error = DisconnectionError.new
end
Expand Down

0 comments on commit d0e3fcf

Please sign in to comment.