在使用 Twisted 和 pyapns 之前,我能够发送推送通知。我不得不重新启动我的 EC2 实例,并启动了我的 Web 服务器,然后我开始扭曲。重启后,我一直无法发送和接收推送通知,我检查了扭曲的日志,这是我发现的:
2013-02-22 17:50:40+0000 [-] Starting factory <pyapns.server.APNSClientFactory instance at 0x90f9e4c>
2013-02-22 17:50:40+0000 [-] APNSClientFactory startedConnecting
2013-02-22 17:50:40+0000 [Uninitialized] APNSProtocol connectionMade
2013-02-22 17:50:41+0000 [APNSProtocol (TLSMemoryBIOProtocol),client] APNSProtocol connectionLost
2013-02-22 17:50:41+0000 [APNSProtocol (TLSMemoryBIOProtocol),client] APNSClientFactory clientConnectionLost reason=[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.]
2013-02-22 17:50:41+0000 [APNSProtocol (TLSMemoryBIOProtocol),client] <twisted.internet.tcp.Connector instance at 0x9025e4c> will retry in 2 seconds
2013-02-22 17:50:41+0000 [APNSProtocol (TLSMemoryBIOProtocol),client] Stopping factory <pyapns.server.APNSClientFactory instance at 0x90f9e4c>
在日志中,trackback 是: Traceback(没有帧的失败):
<class'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.]
我该如何解决这个问题?