From 854382b8be93e0673106fa27474a01149b2a04ce Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 4 Nov 2014 11:21:58 +0100 Subject: [PATCH] Fix cs_put may reconnect if send fails YAZ-798 --- src/tcpip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tcpip.c b/src/tcpip.c index 3ade82b..e2e2014 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -1328,7 +1328,13 @@ int tcpip_put(COMSTACK h, char *buf, int size) h->io_pending = CS_WANT_WRITE; return 1; } - return cont_connect(h); + if (h->flags & CS_FLAGS_BLOCKING) + { + h->cerrno = CSYSERR; + return -1; + } + else + return cont_connect(h); } state->written += res; TRC(fprintf(stderr, " Wrote %d, written=%d, nbytes=%d\n", -- 1.7.10.4