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

Issue 6815049: code review 6815049: net: close fds eagerly in DialTimeout (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by bradfitz
Modified:
11 years, 5 months ago
Reviewers:
CC:
Paul van Brouwershaven, iant2, adg, bendaglish_gmail.com, rsc, golang-dev
Visibility:
Public.

Description

net: close fds eagerly in DialTimeout Integrates with the pollserver now. Uses the old implementation on windows and plan9. Fixes issue 2631

Patch Set 1 #

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

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

Total comments: 1

Patch Set 4 : diff -r 3312fddeb739 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 3312fddeb739 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 3312fddeb739 https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 7 : diff -r 3312fddeb739 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r b68c8ef2a2e9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -65 lines) Patch
M src/pkg/net/dial.go View 1 2 3 4 5 6 8 chunks +48 lines, -29 lines 0 comments Download
M src/pkg/net/dial_test.go View 1 2 3 4 2 chunks +78 lines, -0 lines 0 comments Download
M src/pkg/net/fd_unix.go View 1 2 3 4 5 6 7 3 chunks +8 lines, -4 lines 0 comments Download
M src/pkg/net/iprawsock.go View 1 2 3 4 5 6 4 chunks +11 lines, -3 lines 0 comments Download
M src/pkg/net/iprawsock_plan9.go View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/net/iprawsock_posix.go View 1 2 3 4 chunks +7 lines, -2 lines 0 comments Download
M src/pkg/net/ipsock.go View 1 2 3 4 5 6 7 3 chunks +4 lines, -7 lines 0 comments Download
M src/pkg/net/ipsock_posix.go View 1 3 chunks +6 lines, -3 lines 0 comments Download
M src/pkg/net/lookup.go View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
M src/pkg/net/net.go View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/net/sock_posix.go View 1 2 chunks +6 lines, -1 line 0 comments Download
M src/pkg/net/tcpsock.go View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M src/pkg/net/tcpsock_plan9.go View 1 2 3 4 5 6 2 chunks +11 lines, -1 line 0 comments Download
M src/pkg/net/tcpsock_posix.go View 1 2 3 4 5 6 7 3 chunks +7 lines, -3 lines 0 comments Download
M src/pkg/net/udpsock.go View 1 2 3 4 5 6 2 chunks +9 lines, -2 lines 0 comments Download
M src/pkg/net/udpsock_plan9.go View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M src/pkg/net/udpsock_posix.go View 1 2 3 5 chunks +11 lines, -4 lines 0 comments Download
M src/pkg/net/unixsock_plan9.go View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/net/unixsock_posix.go View 1 2 3 5 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 21
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 5 months ago (2012-10-29 12:50:09 UTC) #1
bradfitz
Thoughts? I don't entirely like how many parameters the internal functions socket and internetSocket take, ...
11 years, 5 months ago (2012-10-29 12:54:17 UTC) #2
Paul van Brouwershaven
I tested DialTimeout with this patch applied but it does not release the file descriptor ...
11 years, 5 months ago (2012-10-29 14:32:39 UTC) #3
iant2
On Mon, Oct 29, 2012 at 5:54 AM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > Thoughts? > ...
11 years, 5 months ago (2012-10-29 16:36:07 UTC) #4
bradfitz
On Mon, Oct 29, 2012 at 3:32 PM, <paul@vanbrouwershaven.com> wrote: > I tested DialTimeout with ...
11 years, 5 months ago (2012-10-29 16:39:03 UTC) #5
bradfitz
On Mon, Oct 29, 2012 at 3:32 PM, <paul@vanbrouwershaven.com> wrote: > I tested DialTimeout with ...
11 years, 5 months ago (2012-10-30 17:16:24 UTC) #6
adg
https://codereview.appspot.com/6815049/diff/3009/src/pkg/net/dial.go File src/pkg/net/dial.go (right): https://codereview.appspot.com/6815049/diff/3009/src/pkg/net/dial.go#newcode96 src/pkg/net/dial.go:96: return dialAddr(net, addr, addri, time.Time{}) var deadline time.Time return ...
11 years, 5 months ago (2012-10-31 07:36:23 UTC) #7
bradfitz
I have a noDeadline variable in the latest version (not yet mailed), which is more ...
11 years, 5 months ago (2012-10-31 08:22:20 UTC) #8
bradfitz
Hello golang-dev@googlegroups.com, paul@vanbrouwershaven.com, iant@google.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-10-31 11:01:07 UTC) #9
bradfitz
This is ready for review now. On Wed, Oct 31, 2012 at 12:01 PM, <bradfitz@golang.org> ...
11 years, 5 months ago (2012-10-31 11:01:31 UTC) #10
Paul van Brouwershaven
I tested this code and it has passed all my initial tests! Thanks for all ...
11 years, 5 months ago (2012-10-31 13:46:50 UTC) #11
bradfitz
That would be one line of code but continues an API proliferation precedent. Can't you ...
11 years, 5 months ago (2012-10-31 13:51:51 UTC) #12
Paul van Brouwershaven
Unfortunately, I need to set the local address which can only be done with DialTCP ...
11 years, 5 months ago (2012-10-31 13:59:45 UTC) #13
Paul van Brouwershaven
The best way to implement this would be by using a setter as it's an ...
11 years, 5 months ago (2012-10-31 15:12:37 UTC) #14
bradfitz
On Wed, Oct 31, 2012 at 4:12 PM, <paul@vanbrouwershaven.com> wrote: > The best way to ...
11 years, 5 months ago (2012-10-31 15:14:39 UTC) #15
BenDaglish
Just to confirm, I had the same problem, and this patch works fine on Centos5 ...
11 years, 5 months ago (2012-10-31 22:32:58 UTC) #16
rsc
Seems fine so far. https://codereview.appspot.com/6815049/diff/5028/src/pkg/net/dial.go File src/pkg/net/dial.go (right): https://codereview.appspot.com/6815049/diff/5028/src/pkg/net/dial.go#newcode53 src/pkg/net/dial.go:53: // TODO(bradfitz): consider pushing the ...
11 years, 5 months ago (2012-11-01 18:39:44 UTC) #17
bradfitz
Hello paul@vanbrouwershaven.com, iant@google.com, adg@golang.org, bendaglish@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-11-02 09:33:49 UTC) #18
bradfitz
PTAL https://codereview.appspot.com/6815049/diff/5028/src/pkg/net/dial.go File src/pkg/net/dial.go (right): https://codereview.appspot.com/6815049/diff/5028/src/pkg/net/dial.go#newcode53 src/pkg/net/dial.go:53: // TODO(bradfitz): consider pushing the deadline down into ...
11 years, 5 months ago (2012-11-02 09:35:02 UTC) #19
Paul van Brouwershaven
I get and error when applying patch set 7, applying the failed patch by hand ...
11 years, 5 months ago (2012-11-08 07:48:29 UTC) #20
bradfitz
11 years, 5 months ago (2012-11-08 16:35:19 UTC) #21
*** Submitted as http://code.google.com/p/go/source/detail?r=20319e86e3c9 ***

net: close fds eagerly in DialTimeout

Integrates with the pollserver now.

Uses the old implementation on windows and plan9.

Fixes issue 2631

R=paul, iant, adg, bendaglish, rsc
CC=golang-dev
http://codereview.appspot.com/6815049
Sign in to reply to this message.

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