diff --git a/pkg/dms/transport.go b/pkg/dms/transport.go index b6c8fc17c9..73686a3d66 100644 --- a/pkg/dms/transport.go +++ b/pkg/dms/transport.go @@ -60,7 +60,10 @@ func (c *Transport) close() (closed bool) { func (c *Transport) awaitResponse(ctx context.Context) error { select { - case f := <-c.readCh: + case f, ok := <-c.readCh: + if !ok { + return io.ErrClosedPipe + } if f.Type() == AcceptType { return nil }