Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ds-ws18
yfs-lab
Commits
ba74563e
Commit
ba74563e
authored
Nov 09, 2014
by
Anjo Vahldiek
Browse files
updated fix
parent
5191362a
Changes
1
Hide whitespace changes
Inline
Side-by-side
rpc/connection.cc
View file @
ba74563e
...
...
@@ -349,13 +349,15 @@ tcpsconn::process_accept()
// garbage collect all dead connections with refcount of 1
std
::
map
<
int
,
connection
*>::
iterator
i
;
for
(
i
=
conns_
.
begin
();
i
!=
conns_
.
end
();
i
++
)
{
for
(
i
=
conns_
.
begin
();
i
!=
conns_
.
end
();
)
{
if
(
i
->
second
->
isdead
()
&&
i
->
second
->
ref
()
==
1
)
{
jsl_log
(
JSL_DBG_2
,
"accept_loop garbage collected fd=%d
\n
"
,
i
->
second
->
channo
());
i
->
second
->
decref
();
conns_
.
erase
(
i
);
}
conns_
.
erase
(
i
++
);
}
else
i
++
;
}
conns_
[
ch
->
channo
()]
=
ch
;
...
...
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