Bitcoin
Sparrow retains partial TCP replies through read timeouts
A November 8 commit changes how Sparrow Wallet reads server responses. The client retains the start of an incomplete response and adds a size threshold while accumulating it.

A response can arrive in fragments
On November 8, Sparrow Wallet changed the TCP transport on its main branch. The patch addresses the case where a server starts sending a response, then lets a read timeout pass before sending the rest. The client reads responses as lines of text. With the previous path, resuming a read could lose the fragment already received at the start of a line. The change keeps that fragment while waiting and attaches it to the characters that arrive afterward.
The new path reads the stream into a character buffer and assembles the line as it goes. If a socket read times out, the loop continues without clearing the text already accumulated. When a newline arrives, the client returns the reconstructed line and retains the remaining characters in the buffer for the next read. This separates the arrival of a network fragment from the logical end of a response. It addresses timeouts encountered while reading the socket.
A threshold while accumulating the response
The code sets a default threshold of 268435456 characters while accumulating a response whose newline has yet to arrive. The check runs when the client has just appended a chunk without a newline. If the threshold is exceeded then, the transport raises a read error. The value is expressed in decoded characters because the network stream is converted to UTF-8 text before processing. It describes neither a size limit in bytes nor a change to the server protocol.
The patch also changes the order of operations when a read fails. The transport marks the connection as stopped before waking the caller waiting for the response. The caller can then observe both the error and the disconnected state together. This matters when the failure comes from an oversized response and a new transport is needed to reconnect. Keeping the start of a line and signaling an error therefore address different situations.
Two scenarios covered by tests
One test simulates a response split between two writes, with a 500 millisecond pause while the socket timeout is set to 100 milliseconds. It checks that the complete response is reconstructed despite multiple read timeouts. Another test lowers the threshold to force an overrun with a response containing no newline. It verifies that the client receives an error and that the transport no longer reports being connected. These scenarios concern client behavior and run against a test server.
The new development on November 8 is the commit in Sparrow’s repository. The document does not say when the change will reach a distributed wallet release. It also reports neither an incident affecting a public server nor an alteration of funds. The observable scope is how the main branch assembles TCP replies and closes a connection when its read safeguard triggers.
