Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8759)

Issue 6575050: code review 6575050: net: close dialing fds in DialTimeout (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by bradfitz
Modified:
11 years, 6 months ago
CC:
golang-dev
Visibility:
Public.

Description

net: close dialing fds in DialTimeout WIP. (Kinda gross) For discussion. Fixes issue 2631

Patch Set 1 #

Patch Set 2 : diff -r c81f0e83b70b https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r c81f0e83b70b https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -16 lines) Patch
M src/pkg/net/dial.go View 1 4 chunks +13 lines, -4 lines 0 comments Download
M src/pkg/net/iprawsock_posix.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/net/ipsock_posix.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/net/sock_posix.go View 1 2 chunks +4 lines, -1 line 0 comments Download
M src/pkg/net/tcpsock_posix.go View 1 3 chunks +8 lines, -3 lines 0 comments Download
M src/pkg/net/udpsock_posix.go View 1 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/net/unixsock_posix.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 6 months ago (2012-09-26 17:35:28 UTC) #1
bradfitz
FWIW, I implemented this for somebody who mailed me privately saying this was a show-stopped ...
11 years, 6 months ago (2012-09-26 17:59:21 UTC) #2
rsc
Integrating with the poll server should be straightforward. In fact it is probably simpler than ...
11 years, 6 months ago (2012-09-26 18:52:27 UTC) #3
brainman
On 2012/09/26 18:52:27, rsc wrote: > Integrating with the poll server should be straightforward. In ...
11 years, 6 months ago (2012-09-27 02:38:37 UTC) #4
Paul van Brouwershaven
I did some testing on this code. Initially everything looks fine and the fd is ...
11 years, 6 months ago (2012-10-02 17:16:05 UTC) #5
bradfitz
*** Abandoned ***
11 years, 6 months ago (2012-10-03 15:04:53 UTC) #6
Paul van Brouwershaven
11 years, 6 months ago (2012-10-04 15:09:44 UTC) #7
When a connection fails because a server not listening on that port, 
fd.connect(ursa) does not return an error but sets fd.isConnected to true. 
This causes an open file descriptor till a timeout occurs. I would also 
suggest that this would be the right place to handle all connection 
timeouts.

if err = fd.connect(ursa); err != nil {
closesocket(s)
fd.Close()
return nil, err
}
fd.isConnected = true 
http://code.google.com/p/go/source/browse/src/pkg/net/sock_posix.go#53

Any idea how to detect the connection failure or/and to implement a better 
timeout handler?

On Wednesday, October 3, 2012 5:04:56 PM UTC+2, Brad Fitzpatrick wrote:
>
> *** Abandoned *** 
>
> http://codereview.appspot.com/6575050/ 
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b