Duh. Actually respond with the correct error code.
Shut down by sending a known-bad message to the APNs gateway.
Added tests (and fixed a potential bug) for the shutdown-with-bad-message strategy.
Broke some of the chunks of the main state machine into their own methods for legibility.
Merge branch 'master' into shutdown_with_known_bad_notification
Simplified and better encapsulated client state management.
Added more sensible shutdown states.
Renamed state-changing methods for clarity.
Improved rejected notification handling when shutting down.
Made shutdown tests actually test shutting down. They now fail.
Fixed a bug where a mis-ordered pipeline prevented malformed messages from being rejected.
Made the connection process more resume- and retry-friendly.
Added support for faster shutdowns if the thread has never actually attempted to send a notification.
Client thread shutdown doesn't need to be exposed publicly.
Renamed some methods to make their purpose clearer.
Added a mechanism for shutting down with a timeout.
Changed the error sent for a zero-length token to match what the real APNs gateway does.
Removed a redundant thread status check.
Added tests to make sure immediate shutdown doesn't choke (see #8).
Merge pull request #4 from relayrides/shutdown_with_known_bad_notification

Shut down with known-bad notification