nomad/houston — pull request #44 by rroblak (2014-04-03 22:48:37+00:00)
Title: Fix bug that skips notification on error status 10

The current behavior incorrectly skips a notification when an error
status code of 10 is received from Apple. Consider a scenario where the
notifications array looks like:

```ruby
notifications = [notification_a, notification_b, notification_c]
```

Let's say that after writing notification_a, Apple responds with an
error-response packet that has a status code of 10 and an Identifier of
0, indicating that `notification_a` was the last (and only) notification
successfully sent.

With the current logic, index would be set to 0 and then bumped to 1.
The `slice!` on notifications would then modify notifications so that its
value is just `[notification_c]`. So `notification_a` would've been
successfully sent, `notification_c` would be queued up for sending, but
`notification_b` would be dropped and never sent.

Getting rid of the increment to `index` fixes this bug, so that both
`notification_b` and `notification_c` will be queued up for resending.