2015年9月3日 星期四

iOS 開發筆記 - Push Notification 收到 SSL operation failed with code 1. OpenSSL Error messages: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry 和 SSL Broken

網路上的一些討論:

  • get SSL Broken pipe error when try to make push notification - http://stackoverflow.com/questions/2626054/get-ssl-broken-pipe-error-when-try-to-make-push-notification
  • APNS SSL operation failed with code 1 - http://stackoverflow.com/questions/18378534/apns-ssl-operation-failed-with-code-1
簡言之,批次處理發訊動作時,其中有一個 notification token 失效時,會導致與 Apple Notification Server 的連線中斷 Orz 例如發 500 個,其中第二個壞了,會導致後面 498 個無法使用前一次的連線,要記得處理一下。解法就是要去偵測連線是否中斷,一旦中斷後要重連。

沒有留言:

張貼留言