mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Return io.EOF from closed udpMuxedConn
This commit is contained in:
+2
-2
@@ -77,7 +77,7 @@ func (c *udpMuxedConn) ReadFrom(b []byte) (n int, rAddr net.Addr, err error) {
|
||||
|
||||
if c.state == udpMuxedConnClosed {
|
||||
c.mu.Unlock()
|
||||
return 0, nil, io.ErrClosedPipe
|
||||
return 0, nil, io.EOF
|
||||
}
|
||||
|
||||
c.state = udpMuxedConnWaiting
|
||||
@@ -86,7 +86,7 @@ func (c *udpMuxedConn) ReadFrom(b []byte) (n int, rAddr net.Addr, err error) {
|
||||
select {
|
||||
case <-c.notify:
|
||||
case <-c.closedChan:
|
||||
return 0, nil, io.ErrClosedPipe
|
||||
return 0, nil, io.EOF
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user