]> Cypherpunks repositories - gostls13.git/commit
net: try to fix setKeepAlivePeriod on Solaris
authorAram Hăvărneanu <aram@mgk.ro>
Tue, 17 Mar 2015 12:50:40 +0000 (13:50 +0100)
committerAram Hăvărneanu <aram@mgk.ro>
Wed, 6 May 2015 12:03:20 +0000 (12:03 +0000)
commitdb8d5b7608fc1ad30d39b1cbec1c9c0c2c1e089d
tree89a39b17e8a9e4cdce056e2114cbb4b7dcc4fe29
parentfe5ef5c9d7dfd02842189956a91af81b1f7ab801
net: try to fix setKeepAlivePeriod on Solaris

Unfortunately Oracle Solaris does not have TCP_KEEPIDLE and
TCP_KEEPINTVL. TCP_KEEPIDLE is equivalent to TCP_KEEPALIVE_THRESHOLD,
but TCP_KEEPINTVL does not have a direct equivalent, so we don't set
TCP_KEEPINTVL any more.

Old Darwin versions also lack TCP_KEEPINTVL, but the code tries to set
it anyway so that it works on newer versions. We can't do that because
Oracle might assign the number illumos uses for TCP_KEEPINTVL to a
constant with a different meaning.

Unfortunately there's nothing we can do if we want to support both
illumos and Oracle Solaris with the same GOOS.

Updates #9614.

Change-Id: Id39eb5147f7afa8e951f886c0bf529d00f0e1bd4
Reviewed-on: https://go-review.googlesource.com/7690
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
src/net/tcpsockopt_solaris.go [new file with mode: 0644]
src/net/tcpsockopt_unix.go