Skip to content

Commit

Permalink
Merge pull request #2177 from PlatONnetwork/feature/bump-version-to-1…
Browse files Browse the repository at this point in the history
….4.2

Feature/bump version to 1.4.2
  • Loading branch information
benbaley committed Oct 18, 2023
2 parents a925ade + 11971c3 commit 382e943
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ loop:
d.doneSinceLastLog++

case c := <-d.addPeerCh:
if c.is(dynDialedConn) || c.is(staticDialedConn) || c.is(consensusDialedConn) {
if !c.is(inboundConn) && (c.is(dynDialedConn) || c.is(staticDialedConn) || c.is(consensusDialedConn)) {
d.dialPeers++
}
id := c.node.ID()
Expand All @@ -302,7 +302,7 @@ loop:
// TODO: cancel dials to connected peers

case c := <-d.remPeerCh:
if c.is(dynDialedConn) || c.is(staticDialedConn) || c.is(consensusDialedConn) {
if !c.is(inboundConn) && (c.is(dynDialedConn) || c.is(staticDialedConn) || c.is(consensusDialedConn)) {
d.dialPeers--
}
delete(d.peers, c.node.ID())
Expand Down

0 comments on commit 382e943

Please sign in to comment.