diff --git a/examples/SpdyServer.cc b/examples/SpdyServer.cc index 73cd9a27..be116bb3 100644 --- a/examples/SpdyServer.cc +++ b/examples/SpdyServer.cc @@ -387,7 +387,7 @@ ssize_t hd_recv_callback(spdylay_session *session, r = SPDYLAY_ERR_CALLBACK_FAILURE; } } else if(r == 0) { - r = SPDYLAY_ERR_CALLBACK_FAILURE; + r = SPDYLAY_ERR_EOF; } return r; } diff --git a/examples/spdycli.c b/examples/spdycli.c index f24dc098..9a0bedff 100644 --- a/examples/spdycli.c +++ b/examples/spdycli.c @@ -210,6 +210,8 @@ static ssize_t recv_callback(spdylay_session *session, } else { rv = SPDYLAY_ERR_CALLBACK_FAILURE; } + } else if(rv == 0) { + rv = SPDYLAY_ERR_EOF; } return rv; }