Hi there (again),

On Thu, 26 Oct 2000, David Schwartz wrote:

> > You have to include that BIO_write(bio_io, ...) in this loop!
> 
>       Why? I have to data to write. If I had data to write, I would have already
> written it before I entered the loop. If I get more data to write later,
> I'll enter the loop again.

ah, that could be the problem in a nutshell then. You may have data to
write on one side that can *not* be written at all this time round. But
other events (such as the handshake with the peer finishing a step or two
later) may make it possible - but you're not retrying the original write
inside your churn() loop so you have a possible deadlock. The thing that
makes that write possible later could be that a write on the other side
has finished the handshake and the tunnel is then open for business again.
That's why the writes have to be inside the loop. :-) They also need to
buffer so that the next call to churn() can retry writes for data that
didn't make it in on previous attempts.

Cheers,
Geoff

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to