Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setKeepAlive for net.socket #48

Merged
merged 1 commit into from
Nov 24, 2017

Conversation

bstream
Copy link
Contributor

@bstream bstream commented Nov 22, 2017

  • Prevent Error: read ECONNRESET when using net.socket by using
    setKeepAlive when connecting.
  • Use an initialDelay of 60 seconds.

Net -> socket.setKeepAlive:
https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay

Closes #38, #41

This can be tested by installing @bstream/winston-logstash@0.3.1

* Prevent `Error: read ECONNRESET` when using net.socket by using
setKeepAlive when connecting.
* Use an `initialDelay` of 60 seconds.

Net -> socket.setKeepAlive:
https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay

Closes jaakkos#38, jaakkos#41
@codler
Copy link

codler commented Nov 23, 2017

Nice! I wish this to be merged also. @jaakkos could you take a look? Thanks

@bstream
Copy link
Contributor Author

bstream commented Nov 24, 2017

Or maybe @djMax? :)

@jaakkos
Copy link
Owner

jaakkos commented Nov 24, 2017

Hmm tests are failing with 0.12 which doesn't support const
Not sure if we should just drop it?

@jaakkos jaakkos merged commit 5ef5a9c into jaakkos:master Nov 24, 2017
@bstream bstream deleted the fix/add-net-keepalive branch November 24, 2017 11:54
@codler
Copy link

codler commented Nov 24, 2017

Thank you @jaakkos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants