Detect peer EOF and TLS closure before reusing idle connections. Make
disconnect idempotent while preserving buffered data and pending operation
lifetimes.
Keep the release branch's multi-byte recv_n behavior, and cover partial EOF,
socket modes, and TLS shutdown with loopback regression tests. Use fixed
test certificates and retain compatibility with the release branch's
Google Test version.
Co-authored-by: woodser <13068859+woodser@users.noreply.github.com>
(cherry picked from commit 096abdaa22b71ade9ca673ed8012c500cecb58d3)
The handshake timeout should just be an absolute timeout, we don't
care about partial messages received during the handshake.
(cherry picked from commit c7c43686878166cd0b93bed0cc712c8dd9845c89)
Identified by @selsta
Callers can otherwise misinterpret int -1 as truthy success,
e.g. see make_payload_send_txs
(cherry picked from commit 9bf193728bb11beb9c40e06a0d48d1c697fe7a84)
foreach_connection() can race with connection destruction while the
protocol handler remains in the raw-pointer map. Use the non-throwing
weak_from_this().lock() in add_ref() and treat expired connections as
unavailable.
This is an interim mitigation pending the broader connection lifetime
fix in PR 7345.
(cherry picked from commit 146f801063b85e23b635c235100cc241e4ab626a)
- Make sure the server sends a complete response when the client
includes the "Connection: close" header.
- Make sure the server terminates in `m_strand` to avoid
concurrent socket closure and ops processing.
(cherry picked from commit ee9e4a49baae0319f6cab543979e221f251339a3)
quick patch which fixes the issue where if you use some macros from `http_server_handlers_map2.h` you have to be in the `epee` namespace or it doesn't compile. Now can remove `using namespace epee;` from header file `core_rpc_server.h`, which caused a couple of name qualifying mistakes
Relevant commits on the old cleanup PR:
36933c7f5c7778e2d7fbfea5361c11fb41070467
21e43de0f300ee47b7e597098908601bf591950b
3c678bb1cedfd7b865ac2e7aaf014de4bfb3eb3d
Actions:
1. Remove unused functions from misc_os_dependent.h
2. Move three remaining functions, get_gmt_time, get_ns_count, and get_tick_count into time_helper.h
3. Remove unused functions from time_helper.h
4. Refactor get_ns_count and get_internet_time_str and get_time_interval_string
5. Remove/add includes as needed
Relevant commits on the old PR:
a9fbe52b02ffab451e90c977459fea4642731cd1
9a59b131c4ed1be8afe238fff3780fe203c65a46
7fa9e2817df9b9ef3f0290f7f86357939829e588
Here lies dozens of unused files. This commit is ONLY file deletions except
for the removing of a couple of #includes and removing filenames from CmakeLists
where appropriate.