fix: 修复日志显示问题

This commit is contained in:
lynx
2023-08-01 13:46:34 +08:00
parent 319263157f
commit b2c23d5cf8

View File

@@ -283,10 +283,10 @@ func (e *Engine) addConn(dst netip.Addr) (PacketChan, error) {
ctx, cancel := context.WithCancel(context.Background())
peerInfo := make(chan peer.AddrInfo)
go func() {
e.log.Infof(ctx, "start find peer %s by DHT", id)
e.log.Infof(ctx, "start find peer %s by DHT", string(id))
peers, err := e.discovery.FindPeers(ctx, string(id))
if err != nil {
e.log.Warningf(ctx, "Finding node %s failed because %s", id, err)
e.log.Warningf(ctx, "Finding node %s failed because %s", string(id), err)
}
for {
@@ -301,7 +301,7 @@ func (e *Engine) addConn(dst netip.Addr) (PacketChan, error) {
}
}()
go func() {
e.log.Infof(ctx, "start find peer %s by mDNS", id)
e.log.Infof(ctx, "start find peer %s by mDNS", string(id))
ticker := time.NewTimer(10 * time.Second)
for {
select {