HF RL Explorer

TCP Server-Client Connection Closure Bug Fix

TCP Server-Client Connection Closure Bug Fix: a task in Terminal-Lego-15k (Harbor dataset). When using Boost.Asio with C++20 coroutines to implement a TCP server that sends a fixed amount of data to clients, a common bug occurs: the client hangs indefinitely in the read() syscall after the server…

The task

When using Boost.Asio with C++20 coroutines to implement a TCP server that sends a fixed amount of data to clients, a common bug occurs: the client hangs indefinitely in the `read()` syscall after the server has finished sending data and called `shutdown()` + `close()`. The client never receives the expected EOF…

Part of PrimeIntellect/Terminal-Lego-15k.