onet icon indicating copy to clipboard operation
onet copied to clipboard

Make API to change websockets write deadline (maybe other timeouts too)

Open kc1212 opened this issue 6 years ago • 1 comments

Problem raised by @JoaoAndreSa

We use constant timeouts in tcp and websocket connections. For applications that send a lot of data or with a slow connection, the timeout needs to be adjusted. The only way to do it at the moment is to change the source code, which isn't ideal.

The expirationTime might need to be adjusted too if the connection timeouts change, maybe a function of the connection timeout?

kc1212 avatar Oct 29 '18 10:10 kc1212

We could make the timeout bigger and the cache expiration at least as big as the timeout but it would only hide the fact that those caches should actually not act like a cache. Given specific conditions, it could happen the cache is cleaned in the middle of a protocol which is bad.

@jeffallen proposed to have a talk with @ineiti. One solution could be to cache resources by connection and clean it up when the connection is closed or it reached the timeout.

Gilthoniel avatar Nov 08 '18 11:11 Gilthoniel