Skip to content

Commit a62e0b6

Browse files
committed
Handle the EOF case and stop reading from the connection.
1 parent 64c48ce commit a62e0b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

service/udp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ func (h *associationHandler) HandleAssociation(ctx context.Context, clientConn n
160160
default:
161161
}
162162
clientProxyBytes, err := clientConn.Read(readBuf)
163-
if errors.Is(err, net.ErrClosed) {
163+
if errors.Is(err, net.ErrClosed) || errors.Is(err, io.EOF) {
164+
debugUDP(l, "Client closed connection")
164165
break
165166
}
166167
pkt := readBuf[:clientProxyBytes]

0 commit comments

Comments
 (0)