jeffwilcox/mpns — pull request #17 by tjunnone (2013-05-17 21:34:21+00:00)
Title: Node 0.10.x notification callback fix

Fix notification callback not being invoked with result and connection reset errors when using Node 0.10.x.

The current MPNS behavior when using Node 0.10.x is that the callback you specify to sendToast or sendTile is not being invoked with a result even though the notification is successfully shown on the phone. Eventually you'll receive a ECONNRESET error when the server closes the socket.

The reason for this is, with the new Node Streams API you must read from the HTTP response stream before 'end' will be emitted.