Unverified Commit 00f5995e authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #38 from libp2p/fix/remove-inline-interface

chore: remove inline interface
parents 42717ef3 cb705a28
......@@ -23,9 +23,11 @@ var log = logging.Logger("tcp-tpt")
// try to set linger on the connection, if possible.
func tryLinger(conn net.Conn, sec int) {
if lingerConn, ok := conn.(interface {
type canLinger interface {
SetLinger(int) error
}); ok {
}
if lingerConn, ok := conn.(canLinger); ok {
_ = lingerConn.SetLinger(sec)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment