Skip to content

Commit b12e0bb

Browse files
committed
Handle the EOF case and stop reading from the connection.
1 parent 589abba commit b12e0bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

service/udp.go

+2-1
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)