addr in dial logs

This commit is contained in:
Sergey Cherepanov 2023-01-15 22:44:09 +03:00 committed by Mikhail Iudin
parent 5855742497
commit 9828b1ea04
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
2 changed files with 2 additions and 3 deletions

View File

@ -98,7 +98,7 @@ func (d *dialer) handshake(ctx context.Context, addr string) (conn drpc.Conn, sc
if err != nil {
return
}
log.Info("connected with remote host", zap.String("serverPeer", sc.RemotePeer().String()), zap.String("per", sc.LocalPeer().String()))
log.Info("connected with remote host", zap.String("serverPeer", sc.RemotePeer().String()), zap.String("addr", addr))
conn = drpcconn.NewWithOptions(sc, drpcconn.Options{Manager: drpcmanager.Options{
Reader: drpcwire.ReaderOptions{MaximumBufferSize: d.config.Stream.MaxMsgSizeMb * (1 << 20)},
}})

View File

@ -70,9 +70,8 @@ func (s *BaseDrpcServer) serve(ctx context.Context, lis secureservice.ContextLis
if err != nil {
if isTemporary(err) {
l.Debug("listener temporary accept error", zap.Error(err))
t := time.NewTimer(500 * time.Millisecond)
select {
case <-t.C:
case <-time.After(time.Second):
case <-ctx.Done():
return
}