projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5474587
)
rigctl tcp server: better connection error handling
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Mon, 27 Nov 2023 17:51:03 +0000
(23:21 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Mon, 27 Nov 2023 17:51:03 +0000
(23:21 +0530)
rigctl.c
patch
|
blob
|
history
diff --git
a/rigctl.c
b/rigctl.c
index 75ab172d8568a2b689984bc87fc80a97f2797b77..087ea926fe9b31004f4ea7465825c6bd3ab04ff2 100644
(file)
--- a/
rigctl.c
+++ b/
rigctl.c
@@
-913,9
+913,13
@@
static gpointer rigctl_client(gpointer data) {
command_index = 0;
}
}
- } else if (numbytes
<
= 0) {
+ } else if (numbytes
=
= 0) {
// print the errno string
- perror("RIGCTL server: got zero bytes from the client");
+ perror("RIGCTL server: connection closed by the client");
+ break;
+ } else if (numbytes == -1) {
+ perror("RIGCTL server: error reading from the client");
+ break;
}
}