diff options
author | Leo Antunes <leo@costela.net> | 2019-04-04 08:50:27 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-04-04 14:51:33 +0000 |
commit | 1abf3aa55bb8b346bb1575ac8db5022f215df65a (patch) | |
tree | 458fdda3c6b2a81c35b67f37398f1c2514cfe5dc /src/net/file_unix.go | |
parent | 964fe4b80ff7a9e5490f11de0e216ae34a019ebc (diff) | |
download | go-git-1abf3aa55bb8b346bb1575ac8db5022f215df65a.tar.gz |
net: add KeepAlive field to ListenConfig
This commit adds a KeepAlive field to ListenConfig and uses it
analogously to Dialer.KeepAlive to set TCP KeepAlives per default on
Accept()
Fixes #23378
Change-Id: I57eaf9508c979e7f0e2b8c5dd8e8901f6eb27fd6
GitHub-Last-Rev: e9e035d53ee8aa3d899d12db08b293f599daecb6
GitHub-Pull-Request: golang/go#31242
Reviewed-on: https://go-review.googlesource.com/c/go/+/170678
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/file_unix.go')
-rw-r--r-- | src/net/file_unix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/file_unix.go b/src/net/file_unix.go index 452a079bfc..dba69554ca 100644 --- a/src/net/file_unix.go +++ b/src/net/file_unix.go @@ -93,7 +93,7 @@ func fileListener(f *os.File) (Listener, error) { } switch laddr := fd.laddr.(type) { case *TCPAddr: - return &TCPListener{fd}, nil + return &TCPListener{fd: fd}, nil case *UnixAddr: return &UnixListener{fd: fd, path: laddr.Name, unlink: false}, nil } |