consume all data after a socket write error
[project/ustream-ssl.git] / ustream-io-cyassl.c
index 1787cd0..0d9633a 100644 (file)
@@ -58,6 +58,9 @@ static int s_ustream_write(char *buf, int len, void *ctx)
 {
        struct ustream *s = ctx;
 
+       if (s->write_error)
+               return len;
+
        return ustream_write(s, buf, len, false);
 }