X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fserver%2Fserver.c;h=a7fddf67492ee5b8994a2b111969f8cd5352f621;hb=950f2405197661974225a578630e44667639ccb6;hp=84ec1ac9bbfb1c59b66cb135bbea622d6461d70f;hpb=ea295bd694250b077b780cfd506cf4d7f6fd1471;p=openocd.git diff --git a/src/server/server.c b/src/server/server.c index 84ec1ac9bb..a7fddf6749 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -71,8 +71,11 @@ static int add_connection(struct service *service, struct command_context *cmd_c c->fd_out = c->fd; /* This increases performance dramatically for e.g. GDB load which - * does not have a sliding window protocol. */ - retval = setsockopt(c->fd, /* socket affected */ + * does not have a sliding window protocol. + * + * Ignore errors from this fn as it probably just means less performance + */ + setsockopt(c->fd, /* socket affected */ IPPROTO_TCP, /* set option at TCP level */ TCP_NODELAY, /* name of option */ (char *)&flag, /* the cast is historical cruft */ @@ -484,7 +487,8 @@ int server_loop(struct command_context *command_context) { if ((FD_ISSET(c->fd, &read_fds)) || c->input_pending) { - if ((retval = service->input(c)) != ERROR_OK) + retval = service->input(c); + if (retval != ERROR_OK) { struct connection *next = c->next; if (service->type == CONNECTION_PIPE)