Project

General

Profile

RE: WResource::handleAbort not always called / Possible ... ยป 0001-Patch-close-socket-on-timeout.patch

Patch to test timeout theory - J n, 09/15/2017 07:30 PM

View differences:

src/Wt/Http/Client.C
if (e != boost::asio::error::operation_aborted) {
boost::system::error_code ignored_ec;
socket().shutdown(boost::asio::ip::tcp::socket::shutdown_both,
ignored_ec);
try {
if (socket().is_open()) {
boost::system::error_code ignored_ec;
socket().shutdown(tcp::socket::shutdown_both, ignored_ec);
socket().close();
}
else {
LOG_INFO("Client::timeout(), socket().is_open() returned false");
}
} catch (std::exception& e) {
LOG_INFO("Client::timeout(), ignoring error: " << e.what());
}
err_ = boost::asio::error::timed_out;
}
    (1-1/1)