nghttpx: Error handling without assert

This commit is contained in:
Tatsuhiro Tsujikawa 2016-04-13 19:22:32 +09:00
parent a16daf109b
commit 81f81e6b70
1 changed files with 6 additions and 2 deletions

View File

@ -2052,7 +2052,9 @@ DownstreamAddrGroup *Http2Session::get_downstream_addr_group() const {
}
void Http2Session::add_to_avail_freelist() {
assert(freelist_zone_ == FREELIST_ZONE_NONE);
if (freelist_zone_ != FREELIST_ZONE_NONE) {
return;
}
if (LOG_ENABLED(INFO)) {
SSLOG(INFO, this) << "Append to http2_avail_freelist, group=" << group_
@ -2066,7 +2068,9 @@ void Http2Session::add_to_avail_freelist() {
}
void Http2Session::add_to_extra_freelist() {
assert(freelist_zone_ == FREELIST_ZONE_NONE);
if (freelist_zone_ != FREELIST_ZONE_NONE) {
return;
}
if (LOG_ENABLED(INFO)) {
SSLOG(INFO, this) << "Append to http2_extra_freelist, addr=" << addr_