Skip to content

Commit 1cd2eb5

Browse files
AudriusButkeviciusxtaci
authored andcommitted
Remove an extra if
1 parent b4eb345 commit 1cd2eb5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sess.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,8 @@ func newUDPSession(conv uint32, dataShards, parityShards int, l *Listener, conn
117117

118118
go sess.updateTask()
119119
go sess.outputTask()
120-
if l == nil { // it's a client connection
120+
if sess.l == nil { // it's a client connection
121121
go sess.readLoop()
122-
}
123-
124-
if l == nil {
125122
atomic.AddUint64(&DefaultSnmp.ActiveOpens, 1)
126123
} else {
127124
atomic.AddUint64(&DefaultSnmp.PassiveOpens, 1)

0 commit comments

Comments
 (0)