Skip to content

Commit ed8eaee

Browse files
committed
nits
1 parent 5573a1b commit ed8eaee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

p2p/transport/tcpreuse/listener.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (m *multiplexedListener) run() error {
260260
select {
261261
case demux.buffer <- connWithScope:
262262
case <-ctx.Done():
263-
log.Debug("accept queue full; dropping connection from: %v", connWithScope.RemoteMultiaddr())
263+
log.Debug("accept timeout; dropping connection from: %v", connWithScope.RemoteMultiaddr())
264264
connWithScope.Close()
265265
}
266266
}()

p2p/transport/websocket/listener.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) {
137137
return
138138
}
139139
select {
140-
case l.incoming <- NewConn(c, l.isWss):
140+
case l.incoming <- nc:
141141
case <-l.closed:
142-
c.Close()
142+
nc.Close()
143143
}
144144
// The connection has been hijacked, it's safe to return.
145145
}

0 commit comments

Comments
 (0)