[Box Backup-commit] [boxbackup/boxbackup] 9b8268: Fix "timeouts" in test/basicserver on FreeBSD

GitHub noreply at github.com
Fri Apr 6 22:19:22 BST 2018


  Branch: refs/heads/s3_support
  Home:   https://github.com/boxbackup/boxbackup
  Commit: 9b82683a2cd8058b555419fd0bbcf58b7c14b9ab
      https://github.com/boxbackup/boxbackup/commit/9b82683a2cd8058b555419fd0bbcf58b7c14b9ab
  Author: Chris Wilson <chris+github at qwirx.com>
  Date:   2018-04-06 (Fri, 06 Apr 2018)

  Changed paths:
    M lib/common/IOStream.h
    M lib/server/ConnectionException.txt
    M lib/server/SocketStream.cpp
    M lib/server/SocketStream.h
    M test/basicserver/testbasicserver.cpp

  Log Message:
  -----------
  Fix "timeouts" in test/basicserver on FreeBSD

If the death of the server was not detected while sending the Quit message to
it, but only later when trying to read the reply (which seems only to happen on
FreeBSD), the empty read from the dead socket caused ReadFullBuffer to return
false, and this was mis-interpreted as a timeout.

Now SocketStream::ReadFullBuffer overrides IOStream::ReadFullBuffer to check
the socket status when this happens, and if the socket is closed then it raises
a more appropriate exception.  test/basicserver now catches this exception too.




More information about the Boxbackup-commit mailing list