summaryrefslogtreecommitdiff
path: root/src/stls/stls_run.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stls/stls_run.c')
-rw-r--r--src/stls/stls_run.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stls/stls_run.c b/src/stls/stls_run.c
index e6ab609..e8305bf 100644
--- a/src/stls/stls_run.c
+++ b/src/stls/stls_run.c
@@ -118,6 +118,12 @@ void stls_run (struct tls *ctx, int *fds, tain_t const *tto, uint32_t options, u
iopause_fd x[4] ;
unsigned int xindex[4] ;
+ if (ndelay_on(fds[0]) < 0
+ || ndelay_on(fds[1]) < 0
+ || ndelay_on(fds[2]) < 0
+ || ndelay_on(fds[3]) < 0)
+ strerr_diefu1sys(111, "set fds non-blocking") ;
+
buffer_init(&b[0].b, &buffer_read, fds[0], b[0].buf, STLS_BUFSIZE) ;
buffer_init(&b[1].b, &buffer_write, fds[1], b[1].buf, STLS_BUFSIZE) ;