Lesterpig / sockpress

A simple express.js and socket.io wrapper for nodejs
MIT License
28 stars 9 forks source link

setting server.timeout #10

Closed ttghr closed 8 years ago

ttghr commented 8 years ago

Hi, the sockpress server has no oppertunity to set server.timeout. A new property serverTimeout in the options solve this problem. In index.js:

if (options.serverTimeout && options.serverTimeout>=0)
  _server.setTimeout(options.serverTimeout);
Lesterpig commented 8 years ago

Hi!

Thank you for pointing out this issue. I'll check this as soon as possible. Tests are broken under the last version of NPM and I have to do some refactor before adding anything to this module.

Lesterpig commented 8 years ago

Ok, I've probably a better idea regarding this issue.

What if Sockpress populates the express application with the raw http or https server? You could then customize this server with any option you want with something like app.rawServer.setTimeout(...). Express provides maybe a way to access the server, but I've not found anything yet...

What do you think about that? :)

ttghr commented 8 years ago

You are right. That is more general and prevents other configuration issues.

Lesterpig commented 8 years ago

Added and available in sockpress@1.0.2 :+1: