I have some problems with sending push notifications to the C # multithread windows service.
When I send a lot of information to APNS, some threads throws an exception:
Unable to write data in the transport connection: Forcibly closed an existing connection by the remote host (Byte [] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) on system.Net.Sockets.NetworkStream.Write (byte [] buffer, int32 offset, int32 size) on System.Net.Security._SslStream.StartWriting On. Net.Security._SslStream.ProcessWrite (byte [] buffer, int32 offset, int32 count, asyncProtocolRequest asyncRequest) (byte [] buffer) on System.Net.Security.SslStream.Write ... < P> I have thread threads of 16 threads, and each thread opens a connection to Apple. sslStream.WriteTimeout = 60000;
I have also tried along with:
It is not an expiration because I have tried with Client.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.KeepAlive, False) ; The connection is not closed at the beginning of sending. Edit: I think all the data is sent, and the apple suddenly closes the connection. Do you know the origin of this exception?
If you need this then I can give you some code.
Thank you very much for your reply! The text "itemprop =" lesson ">
exceptionally" an existing connection was forced to be closed by remote host "generally means that the text after"
The other host was open to the decision you did not talk to any more than you connection. To do this, it sends a set with RST to close the connection with its end.
Since this happens when you send a lot of notification, is this possible service deliberately throttling you have to stop an overload?
Comments
Post a Comment