djacobs/PyAPNs — pull request #98 by jimhorng (2014-11-17 08:03:30+00:00)
Title: avoid wrong error-response worker timed out that cause the worker not being started

* avoid wrong error-response worker timed out that cause the worker not
being started
* increase sent queue buffer
* fix resent qty

Please run test case https://gist.github.com/jimhorng/594401f68ce48282ced5#file-gistfile1-py-L147
to ensure it's working, before the fix, error-response worker will not be started on 2nd notification sent
* before fix
```
[11-17 11:17:14][7268][ErrorResponseHandlerWorker][/PyAPNs/apns.py:580][DEBUG] connection idle after 30 secs
[11-17 11:17:14][7268][ErrorResponseHandlerWorker][/PyAPNs/apns.py:614][DEBUG] error-response handler worker closed
[11-17 11:17:24][7268][ErrorResponseHandlerWorker][/PyAPNs/apns.py:580][DEBUG] connection idle after 40 secs
[11-17 11:17:24][7268][MainThread][/PyAPNs/apns.py:479][DEBUG] initialized error-response handler worker
[11-17 11:17:24][7268][ErrorResponseHandlerWorker][/PyAPNs/apns.py:614][DEBUG] error-response handler worker closed
[11-17 11:17:24][7268][MainThread][/PyAPNs/apns.py:544][DEBUG] error response handler worker is running
[11-17 11:17:24][7268][MainThread][/PyAPNs/apns.py:195][DEBUG] GatewayConnection APNS connection establishing...
[11-17 11:17:25][7268][MainThread][/PyAPNs/apns.py:241][DEBUG] GatewayConnection APNS connection established
[11-17 11:17:25][7268][MainThread][/py_test/apns/apns_test.py:78][INFO] client sent to: 2
```
* after fix
```
[11-17 16:01:34][20993][ErrorResponseHandlerWorker][/PyAPNs/apns.py:579][DEBUG] connection idle after 30 secs
[11-17 16:01:34][20993][ErrorResponseHandlerWorker][/PyAPNs/apns.py:613][DEBUG] error-response handler worker closed
[11-17 16:01:45][20993][MainThread][/PyAPNs/apns.py:479][DEBUG] initialized error-response handler worker
[11-17 16:01:45][20993][MainThread][/PyAPNs/apns.py:543][DEBUG] error response handler worker is running
[11-17 16:01:45][20993][MainThread][/PyAPNs/apns.py:195][DEBUG] GatewayConnection APNS connection establishing...
[11-17 16:01:45][20993][MainThread][/PyAPNs/apns.py:241][DEBUG] GatewayConnection APNS connection established
[11-17 16:01:45][20993][MainThread][/py_test/apns/apns_test.py:80][INFO] client sent to: 2
[11-17 16:01:45][20993][MainThread][/py_test/apns/apns_test.py:82][DEBUG] getting msg from feedback server...
[11-17 16:01:46][20993][ErrorResponseHandlerWorker][/py_test/apns/apns_test.py:52][DEBUG] client get error-response: {'status': 8, 'identifier': 2}
[11-17 16:01:46][20993][ErrorResponseHandlerWorker][/PyAPNs/apns.py:598][INFO] got error-response from APNS:(8, 2)
```