aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-11-22 11:49:52 +0000
committerSpencer Oliver <spen@spen-soft.co.uk>2012-12-24 11:00:52 +0000
commit0466ee7e4a54d1415dea9a8fbe9b361b04895db5 (patch)
treebe561be2c09de44b8028ee87496d26aaeedce0c9 /src/server
parentc3e537a340307f9f94b5b112ed0092b87b8cb640 (diff)
gdb: fix correct shutdown when using pipes
50d5441e2a615fb2c44b41a777e4373901f7a2e6 commit added a regression when using pipes with GDB, OpenOCD would appear to hang when exiting GDB. This fixes that behaviour so we shutdown correctly. Change-Id: I9b337c2bdd41b1966de1c7631118257afcbfa6bd Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/993 Tested-by: jenkins
Diffstat (limited to 'src/server')
-rw-r--r--src/server/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/server.c b/src/server/server.c
index 1499e738..8da82ec8 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -465,9 +465,10 @@ int server_loop(struct command_context *command_context)
retval = service->input(c);
if (retval != ERROR_OK) {
struct connection *next = c->next;
- if (service->type == CONNECTION_PIPE) {
+ if (service->type == CONNECTION_PIPE ||
+ service->type == CONNECTION_STDINOUT) {
/* if connection uses a pipe then
- *shutdown openocd on error */
+ * shutdown openocd on error */
shutdown_openocd = 1;
}
remove_connection(service, c);