Make the test more robust by waiting for the expected error state to be reached. "broken pipe" is the initial error sender gets when trying to write to the disconnected socket, but it can not be reliably observed due to lack of synchronization between the sender thread and the test body.
Make the test more robust by waiting for the expected error state to be reached. "broken pipe" is the initial error sender gets when trying to write to the disconnected socket, but it can not be reliably observed due to lack of synchronization between the sender thread and the test body.