-
Notifications
You must be signed in to change notification settings - Fork 936
Support arbitrary network dialers #287
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
Conversation
One such use case is to use the library within the constraints of Google App Engine https://developers.google.com/appengine/docs/go/sockets/reference
conn.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line doesn't appear to work in Go 1.0.
|
I've added some comments about the implementation, but in general I consider the idea workable. |
|
Thanks for the comments, the part on the DialTimeout case is especially important. I have also ensured backwards compatibility down to go1.0.2 . |
|
My apologies, @fumin, I wasn't aware you had updated this PR. On a quick look it looks like you've addressed all my comments, so I'll have another look this week. Sorry for the delay. |
Conflicts: conn.go
|
@johto no worries, I have resolved the conflicts due to changes in the master repo in the meantime. However, I see that the build failed for the combination of go1.2 and pg9.3 with a connection timeout error. I ran this combination a couple of times locally and every time all tests passed. Could the failure be due to just a temporary glitch in the build cluster? |
I suppose that's possible. But it is a bit suspicious that after changing how dialing works connecting suddenly times out.. I don't see anything obvious in the code, though, but I'll have a closer look later. In the meanwhile, is there a reason to require a pointer receiver in defaultDialer? It seems completely unnecessary. |
|
Right, it might be clearer for |
I can't see anything wrong with the code, nor can I reproduce the problem in any of the environments. I've committed this in 5ff334f. Thanks! |
One such use case is to use the library within the constraints of Google
App Engine
https://developers.google.com/appengine/docs/go/sockets/reference