mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 08:48:27 +00:00
Fix #2130
Some checks failed
abidiff / abi (push) Has been cancelled
test / style-check (push) Has been cancelled
test / ubuntu (32-bit) (push) Has been cancelled
test / ubuntu (64-bit) (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows with SSL (push) Has been cancelled
test / windows without SSL (push) Has been cancelled
test / windows compiled (push) Has been cancelled
Some checks failed
abidiff / abi (push) Has been cancelled
test / style-check (push) Has been cancelled
test / ubuntu (32-bit) (push) Has been cancelled
test / ubuntu (64-bit) (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows with SSL (push) Has been cancelled
test / windows without SSL (push) Has been cancelled
test / windows compiled (push) Has been cancelled
This commit is contained in:
parent
caf7c55785
commit
9589519d58
1 changed files with 3 additions and 2 deletions
|
@ -7329,8 +7329,9 @@ Server::process_request(Stream &strm, const std::string &remote_addr,
|
|||
}
|
||||
|
||||
// Setup `is_connection_closed` method
|
||||
req.is_connection_closed = [&]() {
|
||||
return !detail::is_socket_alive(strm.socket());
|
||||
auto sock = strm.socket();
|
||||
req.is_connection_closed = [sock]() {
|
||||
return !detail::is_socket_alive(sock);
|
||||
};
|
||||
|
||||
// Routing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue