Fix setting the TLS error to the read/write length.