Clearance about socket options keepAlive, socketTimeoutMS and connectTimeoutMS

23 views
Skip to first unread message

Paul Klimashkin

unread,
Oct 20, 2015, 2:06:48 PM10/20/15
to Mongoose Node.JS ODM
Hello!
In docs said that For long running applictions it is often prudent to enable keepAlive
socketOptions: { keepAlive: 1 }

But in code I see that enabling of keepAlive depends of typeof options.socketOptions.keepAlive == 'number'. So I can use keepAlive: 0?

But for options socketTimeoutMS and connectTimeoutMS conditions lokks like this:
if(options.socketOptions.socketTimeoutMS) {

So I can't use zero values for them?

Reply all
Reply to author
Forward
0 new messages