nghttpx: Fix assertion failure on TLS handshake
This commit is contained in:
parent
991352d201
commit
4aaf111c58
|
@ -146,7 +146,14 @@ int shrpx_bio_write(BIO *b, const char *buf, int len) {
|
|||
if (conn->tls.initial_handshake_done) {
|
||||
// After handshake finished, send |buf| of length |len| to the
|
||||
// socket directly.
|
||||
assert(wbuf.rleft() == 0);
|
||||
|
||||
// Only when TLS session was prematurely ended before server sent
|
||||
// all handshake message, this condition is true. This could be
|
||||
// alert from SSL_shutdown(). Since connection is already down,
|
||||
// just return error.
|
||||
if (wbuf.rleft()) {
|
||||
return -1;
|
||||
}
|
||||
auto nwrite = conn->write_clear(buf, len);
|
||||
if (nwrite < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue