X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ftcpip.c;fp=src%2Ftcpip.c;h=e2e2014d4dfb39ed005a639ee919ecf751514b6a;hp=3ade82b428689ec4deea7c6acd257bce911be280;hb=854382b8be93e0673106fa27474a01149b2a04ce;hpb=e3e6a89b0ebc5270208139c22d68735ee6626a19 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",