What would cause APNs feedback service to timeout constantly while gateway works perfectly?

StackOverflow https://stackoverflow.com/questions/13116251

سؤال

I am using PHP code from as many various web sites as possible, after having written my own, and everything fails with connection to the apple push notification feedback service.

In a nutshell:

$stream_context = stream_context_create();


stream_context_set_option($stream_context, 'ssl', 'local_cert', $certkeypath);      

stream_context_set_option($stream_context, 'ssl', 'passphrase', $pass);

$apns = stream_socket_client('ssl://feedback.sandbox.push.apple.com:2196', $errcode, $errstr, 60, STREAM_CLIENT_CONNECT, $stream_context);

if(!$apns) {
 echo "ERROR $errcode: $errstr\n";
 return;
}

The above code times out 100% of all connection requests tonight. BUT! If the address is changed from feedback.sandbox.push.apple.com to gateway.sandbox.push.apple.com, and the port is changed from 2196 to 2195, then everything works 100%, all push notifications are delivered. I deleted the app from one of my devices and continued sending it push notifications, so I have been expecting real results from feedback, but nothing.

So is there a reason why the gateway works but feedback doesn't, it seems the only difference is the port and address. Possibly the flags, but I'm using code other people claim works.

Makes me think the APNs feedback service is down for maintenance.

هل كانت مفيدة؟

المحلول

Now 3 weeks later, an idea: could be a firewall?

Sure enough, it was.

Now, I can read the APNs Feedback without timeouts. :D

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top