SocketFrameHandler
's WriteTimeout
not applicable for async writes
#1265
Milestone
SocketFrameHandler
's WriteTimeout
not applicable for async writes
#1265
Within
SocketFrameHandler
, it specifically uses a write timeout and sets this on both theNetworkStream
'sWriteTimeout
property (which internally sets it on the socket) as well as the frame handler's ownWriteTimeout
(which also sets it on the socket). The problem isn't necessarily setting it but the fact that the socket'sSendTimeout
, according to Microsoft's documentation, does not apply on asynchronous sends - the same ones used within the write loop of the socket handler.There is an issue tracking better socket timeouts which would be applicable once they are designed and merged into the runtime but for now, the
WriteTimeout
gives at best a false sense of security. I can't see a way to patch around the behaviour without changes in the runtime.I know you'd want a specific action here for your GitHub issues so I'd probably suggest some amount of documentation somewhere - perhaps both in-code for the
SocketFrameHandler
(I'm happy to contribute this) but also anywhere else you feel is appropriate.For what its worth, because you read from the socket synchronously, you don't have the same issue with
ReadTimeout
/ReceiveTimeout
.The text was updated successfully, but these errors were encountered: