• Aram Hăvărneanu's avatar
    net: try to fix setKeepAlivePeriod on Solaris · db8d5b76
    Aram Hăvărneanu authored
    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/7690Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
    db8d5b76
tcpsockopt_solaris.go 1.23 KB