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