Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Support for timeouted connection (net.DialTimeout) #25

Open
alkuzad opened this issue Jan 11, 2017 · 1 comment
Open

Support for timeouted connection (net.DialTimeout) #25

alkuzad opened this issue Jan 11, 2017 · 1 comment

Comments

@alkuzad
Copy link

alkuzad commented Jan 11, 2017

Currently net.Dial and tls.Dial allows connection to take forever, it can stuck setup of syslog service.

However net.Dial can be changed to net.DialWithTimeout and tls.Dial to tls.DialWithDialer passing net.Dialer.

@sirsean
Copy link
Contributor

sirsean commented Jan 20, 2017

I like this idea.

I can see how we'd add a timeout field to Writer and use it in dialer.go to call the right net.Dial function.

I don't think we can add this without changing the signature of the srslog.Dial functions and breaking backwards compatibility, which is unfortunate.

It may be time to add a DialOptions struct to give us this flexibility, while allowing us to maintain compatibility with older code. Let me think about this. 😄

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

No branches or pull requests

2 participants