Commit 5c3c0a05 authored by vyzo's avatar vyzo

more idiomatic code

parent 98c7c00c
......@@ -202,8 +202,7 @@ func (s *Swarm) addConn(tc transport.CapableConn, dir network.Direction) (*Conn,
// create the Stat object, initializing with the underlying connection Stat if available
var stat network.Stat
cs, ok := tc.(network.ConnStat)
if ok {
if cs, ok := tc.(network.ConnStat); ok {
stat = cs.Stat()
}
stat.Direction = dir
......
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