devtls writes are only atomic up to MaxRecLen as this is the maximum payload size we put in a record application message.
Unified · Split
| @@ -496,7 +496,7 @@ tlsopen(Chan *c, int omode) · 495 unmodified lines | |||
| 496 | c->mode = openmode(omode); | 496 | c->mode = openmode(omode); |
| 497 | c->flag |= COPEN; | 497 | c->flag |= COPEN; |
| 498 | c->offset = 0; | 498 | c->offset = 0; |
| 499 | c->iounit = qiomaxatomic; | 499 | c->iounit = MaxRecLen; |
| 500 | return c; | 500 | return c; |
| 501 | } | 501 | } |
| 502 | 502 | ||
| @@ -1581,8 +1581,8 @@ tlswrite(Chan *c, void *a, long n, vlong off) · 1078 unmodified lines | |||
| 1581 | e = p + n; | 1581 | e = p + n; |
| 1582 | do{ | 1582 | do{ |
| 1583 | m = e - p; | 1583 | m = e - p; |
| 1584 | if(m > MaxRecLen) | 1584 | if(m > c->iounit) |
| 1585 | m = MaxRecLen; | 1585 | m = c->iounit; |
| 1586 | 1586 | ||
| 1587 | b = allocb(m); | 1587 | b = allocb(m); |
| 1588 | if(waserror()){ | 1588 | if(waserror()){ |