1. 12 Sep, 2017 5 commits
  2. 05 Sep, 2017 1 commit
  3. 04 Sep, 2017 3 commits
  4. 03 Sep, 2017 4 commits
  5. 19 Aug, 2017 1 commit
  6. 18 Aug, 2017 7 commits
  7. 16 Aug, 2017 3 commits
    • Kenton Varda's avatar
      Fix bug in closing proxied WebSockets. · 6e4c5ce3
      Kenton Varda authored
      The proxying code was responding to a `Close` message by ending the pump loop, which had the effect of immediately dropping the connection after a `Close` had been seen in each direction. This is arguably incorrect behavior: for proxying purposes, `Close` messages and underlying TCP disconnects should be treated as independent events, forwarded separately.
      
      In practice this "bug" probably would never cause a problem and perhaps doesn't even violate spec (since `Close` was seen in both directions). But, OSX's implementation of shutdown() returns ENOTCONN if the connection has already been disconnected from the remote end. This is the case here, as the proxy dropped all connections immediately after sending the final `Close`.
      
      This in turn led to a unit test failure.
      
      The intended behavior was that the proxy would forward exactly what it saw: If a `Close` was sent, it would be forwarded, without changing the underlying connection state. If a TCP disconnect was detected, it would be "forwarded" by disconnecting the next leg. This change implements that behavior.
      6e4c5ce3
    • Kenton Varda's avatar
      74913d84
    • Kenton Varda's avatar
      Try to fix test failure on Win32. · 442cf7f2
      Kenton Varda authored
      Due to differences in the way I/O events are queued on Windows, the timing of this test end up different, such that the two incoming pings are not both received before the large outgoing message is sent.
      
      To fix this, I removed the dependency on native I/O altogether by implementing an in-memory pipe that does no buffering (it requires a read() and write() to rendezvous, then copies between their buffers).
      442cf7f2
  8. 15 Aug, 2017 8 commits
  9. 14 Aug, 2017 8 commits