stream: Fix flushing when tls is disabled
parent
844645d63b
commit
10473597c5
|
@ -229,11 +229,14 @@ static void stream__on_readable(struct stream* self)
|
||||||
{
|
{
|
||||||
switch (self->state) {
|
switch (self->state) {
|
||||||
case STREAM_STATE_NORMAL:
|
case STREAM_STATE_NORMAL:
|
||||||
|
/* fallthrough */
|
||||||
#ifdef ENABLE_TLS
|
#ifdef ENABLE_TLS
|
||||||
case STREAM_STATE_TLS_READY:
|
case STREAM_STATE_TLS_READY:
|
||||||
|
#endif
|
||||||
if (self->on_event)
|
if (self->on_event)
|
||||||
self->on_event(self, STREAM_EVENT_READ);
|
self->on_event(self, STREAM_EVENT_READ);
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_TLS
|
||||||
case STREAM_STATE_TLS_HANDSHAKE:
|
case STREAM_STATE_TLS_HANDSHAKE:
|
||||||
stream__try_tls_accept(self);
|
stream__try_tls_accept(self);
|
||||||
break;
|
break;
|
||||||
|
@ -248,10 +251,13 @@ static void stream__on_writable(struct stream* self)
|
||||||
{
|
{
|
||||||
switch (self->state) {
|
switch (self->state) {
|
||||||
case STREAM_STATE_NORMAL:
|
case STREAM_STATE_NORMAL:
|
||||||
|
/* fallthrough */
|
||||||
#ifdef ENABLE_TLS
|
#ifdef ENABLE_TLS
|
||||||
case STREAM_STATE_TLS_READY:
|
case STREAM_STATE_TLS_READY:
|
||||||
|
#endif
|
||||||
stream__flush(self);
|
stream__flush(self);
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_TLS
|
||||||
case STREAM_STATE_TLS_HANDSHAKE:
|
case STREAM_STATE_TLS_HANDSHAKE:
|
||||||
stream__try_tls_accept(self);
|
stream__try_tls_accept(self);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue