Skip to content

Commit

Permalink
Work around swoc::bwf::If crash.
Browse files Browse the repository at this point in the history
The use of swoc::bwf::If crashes sometimes under load. Removing the call
of this for now.
  • Loading branch information
bneradt authored and bneradt committed Oct 7, 2020
1 parent 47d9889 commit 64f4ccb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions local/src/core/ProxyVerifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,18 @@ Session::write_body(HttpHeader const &hdr)
swoc::Rv<ssize_t> bytes_written{0};
std::error_code ec;

#if 0
// The use of this swoc::bwf::If crashes infrequently. Removing for now.
bytes_written.errata().diag(
"Transmit {} byte body {}{}.",
hdr._content_size,
swoc::bwf::If(hdr._content_length_p, "[CL]"),
swoc::bwf::If(hdr._chunked_p, "[chunked]"));
#else
// Use this workaround for now to avoid the above mentioned crash.
auto const *body_type = hdr._content_length_p ? "[CL]" : "[chunked]";
bytes_written.errata().diag("Transmit {} byte body {}.", hdr._content_size, body_type);
#endif

/* Observe that by this point, hdr._content_size will have been adjusted to 0
* for HEAD requests via update_content_length. */
Expand Down

0 comments on commit 64f4ccb

Please sign in to comment.