Closed andreichuk closed 6 years ago
@andreichuk would you be able to give some reproducible example that could serve as a test scenario?
@Horusiath here you are https://github.com/andreichuk/AkkaIOTest
@Horusiath please check a fix prototype https://github.com/andreichuk/akka.net/commit/cbdec92b13c4c5dbfe13ce03dc8225d180ca71f9
Resolved via https://github.com/akkadotnet/akka.net/pull/3206
Akka.NET version 1.3.2 Windows 10
Akka.IO does not handle non-fatal socket errors like WSAEWOULDBLOCK (System.Net.Sockets.SocketError.WouldBlock) which lead to closing of a connection. From MSDN: Resource temporarily unavailable. This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later.
When I'm trying to send a large (1 Mb or more) amount of data over the wire, I split it in chunks ~64kb and send one by one:
I checked this code. It does not catch any exceptions, just checks a number of bytes written. Maybe there should be a catcher for WSAEWOULDBLOCK that waits for N milliseconds and then call the method again? Or you have better ideas? Help is appreciated! :)