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 | 496 | c->mode = openmode(omode); |
| 497 | 497 | c->flag |= COPEN; |
| 498 | 498 | c->offset = 0; |
| 499 | − c->iounit = qiomaxatomic; | |
| 499 | + c->iounit = MaxRecLen; | |
| 500 | 500 | return c; |
| 501 | 501 | } |
| 502 | 502 | |
| @@ -1581,8 +1581,8 @@ tlswrite(Chan *c, void *a, long n, vlong off) · 1078 unmodified lines | ||
| 1581 | 1581 | e = p + n; |
| 1582 | 1582 | do{ |
| 1583 | 1583 | m = e - p; |
| 1584 | − if(m > MaxRecLen) | |
| 1585 | − m = MaxRecLen; | |
| 1584 | + if(m > c->iounit) | |
| 1585 | + m = c->iounit; | |
| 1586 | 1586 | |
| 1587 | 1587 | b = allocb(m); |
| 1588 | 1588 | if(waserror()){ |