From f55c7e5bd680ce5808ab13baf4fd7cbc91024264 Mon Sep 17 00:00:00 2001 From: henrylee2cn Date: Thu, 1 Aug 2019 10:51:31 +0800 Subject: [PATCH] fix: redial #56 Change-Id: I1b260ddb4e0562dbfefa3826008a09f7de84deae --- peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer.go b/peer.go index b99d649d..9488c41c 100644 --- a/peer.go +++ b/peer.go @@ -282,7 +282,7 @@ func (p *peer) newSessionForClient(dialFunc func() (net.Conn, error), addr strin time.Sleep(p.redialInterval) Debugf("trying to redial... (network:%s, addr:%s, id:%s)", p.network, sess.RemoteAddr().String(), sess.ID()) stat = p.renewSessionForClient(sess, dialFunc, addr, protoFuncs) - if !stat.OK() { + if stat.OK() { Infof("redial ok (network:%s, addr:%s, id:%s)", p.network, sess.RemoteAddr().String(), sess.ID()) return true }