-
Is there a way to perform a specific action when idleTimeout is performed? For example, I want to be able to send the client a message that they've been kicked for being idle instead of abruptly ending the connection without their knowledge. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It could be added but I think that is overcomplicating a simple issue. Since idleTimeout is used to enforce a particular minimal flow of data, whenever this timeout happens you probably already have backpressure and adding even more backpressure is not ideal. You also have about 55 different cases where proxies and whatnot will drop connections so this isn't really an issue worth making more complicated than what it has to be, because you can never guarantee the connection will in fact receive that close reason. The fact this library even has built-in timeout handling is already covering more than what many other libraries have. |
Beta Was this translation helpful? Give feedback.
It could be added but I think that is overcomplicating a simple issue. Since idleTimeout is used to enforce a particular minimal flow of data, whenever this timeout happens you probably already have backpressure and adding even more backpressure is not ideal. You also have about 55 different cases where proxies and whatnot will drop connections so this isn't really an issue worth making more complicated than what it has to be, because you can never guarantee the connection will in fact receive that close reason. The fact this library even has built-in timeout handling is already covering more than what many other libraries have.