Export to GitHub

apns-python-wrapper - issue #8

No support for keeping connection to apns open


Posted on Jul 8, 2010 by Swift Rabbit

The connection to the apns should be kept open between .notify()s. Instead it is closed and reopened each time you want to send a new message.

Apple says in its documentation that repeated opening and closing of connections may lead to banning. Instead you should keep the connection open until apple closes it when an error occurs.

Without this feature, it does not make it plausible to use the wrapper in production. I really would love to though, it is a great tool so far.

Comment #1

Posted on Jul 8, 2010 by Happy Cat

It would be a new feature of 0.7 version of APNSWrapper.

Comment #2

Posted on Jul 8, 2010 by Swift Rabbit

That would be very nice, thanks klymyshyn.

Comment #3

Posted on Feb 24, 2011 by Massive Elephant

Any news on this?

Comment #4

Posted on Feb 24, 2011 by Happy Cat

Hey guys, check out latest source code updates. But you have to handle connections error by yourself - notification.send() may generate "APNSConnectionError" and maybe other exceptions not related to SSL module (I know only about SSLError). So, if you need new functionality right now - go ahead. I'll build new version after additional testing.

Comment #5

Posted on Apr 8, 2012 by Helpful Wombat

Any news on this?

Comment #6

Posted on Apr 8, 2012 by Happy Cat

Honestly, I've not worked on it because of lack of device and iphone developer account. Here is early alpha of the code https://github.com/joymax/python-apns

I know that this wrapper worked on production project. But I can't confirm that it working now as expected.

BTW, I'm still waiting for donation - any iphone device and iphone developer account :)

Comment #7

Posted on Jul 31, 2014 by Quick Elephant

can anybody tell me ..if APNSwrapper solves it now ? is there a way to keep the connection persistent ?

Status: New

Labels:
Type-Defect Priority-Medium