Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
auke.klazema
dt_ctrl
Commits
5cb13f3c
Commit
5cb13f3c
authored
Feb 24, 2014
by
Jeroen Vreeken
Browse files
Fix 100% cpu bug when controller connection is lost.
parent
bf05625e
Changes
1
Hide whitespace changes
Inline
Side-by-side
console/console/log_proxy.c
View file @
5cb13f3c
...
...
@@ -222,11 +222,14 @@ int main (int argc, char **argv)
}
}
if
(
ret
<
0
&&
errno
!=
EAGAIN
&&
errno
!=
EWOULDBLOCK
)
{
if
(
ret
==
0
||
(
ret
<
0
&&
errno
!=
EAGAIN
&&
errno
!=
EWOULDBLOCK
))
{
printf
(
"Close connection to server
\n
"
);
close
(
fd_log
);
fd_log
=
-
1
;
entry
=
log_entry_alloc
();
log_string
(
entry
->
buffer
,
LOG_ENTRY_LEN
,
LOG_T_ERROR
,
"Lost connection to controller"
);
entry
->
buffer
[
strlen
(
entry
->
buffer
)
+
1
]
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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