未验证 提交 4e5bddee 编写于 作者: H hitzhangjie 提交者: GitHub

cmd/dlv: use simple chan read instead of select-case (#2649)

上级 6b83e6ba
......@@ -746,15 +746,10 @@ func waitForDisconnectSignal(disconnectChan chan struct{}) {
// as SIGINT to delve. Ignore it instead of stopping the server
// in order to be able to debug signal handlers.
go func() {
for {
select {
case <-ch:
}
for range ch {
}
}()
select {
case <-disconnectChan:
}
<-disconnectChan
} else {
select {
case <-ch:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册