Always call recv() when select() says the passthru_socket is readable, even if the outbuf is full. This resolves an issue where the disconnection of the passthru_socket would not be detected if the outbuf was full (e.g. the output_thread stopped running). Also, check if RingBufWrite() returns a short-write count and log the values (actual versus expected write byte count).
Showing with 15 additions and 7 deletions