2

我正在开发基于 .Net 的 APNS 提供程序,并且我正在使用 SSLStream 与 A​​PNS 通信。我正面临一个真正让我烦恼的小问题。

有时,当我发送通知,然后流写入器刷新通知字节时,流读取器会无缘无故地引发以下异常。

IOException System.IO.IOException: Unable to read data from the transport 
connection: An existing connection was forcibly closed by the remote host. 
---> System.Net.Sockets.SocketException: An existing connection was forcibly 
closed by the remote host

根据 Apple 的文档,如果出现错误,在关闭连接之前应该收到一条错误消息,但我没有收到任何消息。

有人对这个案子有线索吗?为什么在“推送”之后立即关闭连接?这是一个已知问题吗?

4

0 回答 0