From d622202db188ba4ebc9df9ae2ed172ce53551f57 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 24 May 2020 17:58:08 +0000 Subject: [PATCH] fixed a bug in cgi_peer_on_write() --- mio/lib/http-svr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mio/lib/http-svr.c b/mio/lib/http-svr.c index 5f58257..809b76b 100644 --- a/mio/lib/http-svr.c +++ b/mio/lib/http-svr.c @@ -1062,6 +1062,8 @@ static int cgi_peer_on_write (mio_dev_pro_t* pro, mio_iolen_t wrlen, void* wrctx cgi_peer_xtn_t* cgi_peer = mio_dev_pro_getxtn(pro); cgi_state_t* cgi_state = cgi_peer->state; + if (cgi_state == MIO_NULL) return 0; /* there is nothing i can do. the cgi_state is being cleared or has been cleared already. */ + MIO_ASSERT (mio, cgi_state->peer == pro); if (wrlen <= -1)