mreinstein / node-gearman

⚙ Gearman client and worker for node
75 stars 13 forks source link

added KeepAlive to socket-options #30

Closed int2001 closed 1 year ago

int2001 commented 1 year ago

In some circumstances the socket throws an unhandled ECONNRESET, because something between Server & Client terminates the TCP-Connections. This options allows to do a TCP-Keepalive, so this wont happen anymore.

Please add this to the master

mreinstein commented 1 year ago

Thanks for the PR!

mreinstein commented 1 year ago

It would be nice if this were documented

int2001 commented 1 year ago

It would be nice if this were documented

Sure. it is documented within the PR. If you tell me where to document, i'll copypaste the Message and write a little explanation on top.

mreinstein commented 1 year ago

I'd put it in the examples section, so people know that KeepAlive is now a valid option.

example from the readme showing usage of the timeout option:

let client = gearman("localhost", 4730 , { timeout: 3000 })  // timeout in milliseconds.