Skip to content

Commit 60ca972

Browse files
committed
Return io.EOF from closed udpMuxedConn
1 parent e1c2d85 commit 60ca972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

udp_muxed_conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (c *udpMuxedConn) ReadFrom(b []byte) (n int, rAddr net.Addr, err error) {
8888

8989
if c.state == udpMuxedConnClosed {
9090
c.mu.Unlock()
91-
return 0, nil, io.ErrClosedPipe
91+
return 0, nil, io.EOF
9292
}
9393

9494
c.state = udpMuxedConnWaiting
@@ -97,7 +97,7 @@ func (c *udpMuxedConn) ReadFrom(b []byte) (n int, rAddr net.Addr, err error) {
9797
select {
9898
case <-c.notify:
9999
case <-c.closedChan:
100-
return 0, nil, io.ErrClosedPipe
100+
return 0, nil, io.EOF
101101
}
102102
}
103103
}

0 commit comments

Comments
 (0)