projects
/
soc-cxxrtl-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76994c2
)
try to get disconnect to close socket, ah well
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 8 Apr 2021 14:06:34 +0000
(15:06 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 8 Apr 2021 14:06:34 +0000
(15:06 +0100)
small_jtag_test/main.cpp
patch
|
blob
|
history
diff --git
a/small_jtag_test/main.cpp
b/small_jtag_test/main.cpp
index ed7a2a644f2cd473395591ad6bda06af913aa629..7859f647da0e7ffef4fa80972332ac91504d1437 100644
(file)
--- a/
small_jtag_test/main.cpp
+++ b/
small_jtag_test/main.cpp
@@
-100,7
+100,12
@@
int read_handler(int fdread, char *buffer)
case 0:
return 0; // timeout (nothing read)
default:
- return read(fdread, buffer, 1);
+ status = read(fdread, buffer, 1);
+ if (status == -1) {
+ printf("Error reading on socket\n");
+ close(fdread);
+ }
+ return status;
}
}