In node js, by default the socket timeout package has been set for two minutes which I found in the document. I want the place where this code is lying inside the package so that I can modify it.
I have found the following alternative solution, but I want to convert it to the main library.
var serverInstance = http.createServer (app) .listen (port, function () {// code} serverInstance.timeout = 0; // disable timeout server instance.on ('Timeout', function (socket) {// custom code});
For your reference: 1.) Express.js server is API 2.) Connect.js session management API is
Socket timeout is set by calling. When a socket is assigned to a server, the server runs one.
Therefore, you should find out where you are using the library while overriding the socket timeout. If they do not display it as an option, you can override Socket.prototype.setTimeout
to ensure that only timeout you want to set up.
Comments
Post a Comment