projects
/
soc-cxxrtl-sim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
try to get disconnect to close socket, ah well
[soc-cxxrtl-sim.git]
/
small_jtag_test
/
main.cpp
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;
}
}