WebSocket::send_frame returned false when write_websocket_frame failed
but left the connection open, and the Pong reply in read() ignored a
failed write. A write that fails partway (the write timeout expiring
while the peer is not reading) has already sent a frame header that
announces the whole payload, so anything written after it is read by
the peer as the rest of that frame, and a later payload's bytes as a
frame of their own. Mark the connection closed on a failed write, as
the heartbeat already does for its Ping, and send the Pong through
send_frame.