Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
ba4b52e7
Commit
ba4b52e7
authored
Apr 16, 2020
by
Dirk McCormick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: don't hang on to disconnected peer refs
parent
c1922c0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
network/ipfs_impl.go
network/ipfs_impl.go
+5
-2
No files found.
network/ipfs_impl.go
View file @
ba4b52e7
...
...
@@ -424,8 +424,11 @@ func (c *connectEventManager) Disconnected(p peer.ID) {
state
.
refs
--
c
.
conns
[
p
]
=
state
if
state
.
refs
==
0
&&
state
.
responsive
{
c
.
bsnet
.
receiver
.
PeerDisconnected
(
p
)
if
state
.
refs
==
0
{
if
state
.
responsive
{
c
.
bsnet
.
receiver
.
PeerDisconnected
(
p
)
}
delete
(
c
.
conns
,
p
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment