fix: 修复查询节点直接退出问题

This commit is contained in:
lynx
2023-08-01 13:02:32 +08:00
parent e72191f7d0
commit 319263157f

View File

@@ -281,8 +281,6 @@ func (e *Engine) addConn(dst netip.Addr) (PacketChan, error) {
e.routeTable.addr.Store(dst, peerChan)
dev := &devWrapper{w: e.devWriter, r: peerChan}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
peerInfo := make(chan peer.AddrInfo)
go func() {
e.log.Infof(ctx, "start find peer %s by DHT", id)