Return SPDYLAY_ERR_EOF when SSL_read() returned 0

This commit is contained in:
Tatsuhiro Tsujikawa 2012-05-11 21:40:51 +09:00
parent b0761a3eba
commit c1d360469a
2 changed files with 3 additions and 1 deletions

View File

@ -387,7 +387,7 @@ ssize_t hd_recv_callback(spdylay_session *session,
r = SPDYLAY_ERR_CALLBACK_FAILURE; r = SPDYLAY_ERR_CALLBACK_FAILURE;
} }
} else if(r == 0) { } else if(r == 0) {
r = SPDYLAY_ERR_CALLBACK_FAILURE; r = SPDYLAY_ERR_EOF;
} }
return r; return r;
} }

View File

@ -210,6 +210,8 @@ static ssize_t recv_callback(spdylay_session *session,
} else { } else {
rv = SPDYLAY_ERR_CALLBACK_FAILURE; rv = SPDYLAY_ERR_CALLBACK_FAILURE;
} }
} else if(rv == 0) {
rv = SPDYLAY_ERR_EOF;
} }
return rv; return rv;
} }