diff --git a/c++/src/kj/compat/http-test.c++ b/c++/src/kj/compat/http-test.c++
index 8c348e02fe0731b0e92d0eb61b336ac89cb58798..613e0820770db0a83bad5b1cd185c0d41c579224 100644
--- a/c++/src/kj/compat/http-test.c++
+++ b/c++/src/kj/compat/http-test.c++
@@ -1459,7 +1459,7 @@ KJ_TEST("HttpInputStream responses") {
     KJ_CONTEXT(testCase.raw);
 
     KJ_ASSERT(input->awaitNextMessage().wait(waitScope));
-    
+
     auto resp = input->readResponse(testCase.method).wait(waitScope);
     KJ_EXPECT(resp.statusCode == testCase.statusCode);
     KJ_EXPECT(resp.statusText == testCase.statusText);
@@ -2610,13 +2610,6 @@ KJ_TEST("newHttpService from HttpClient WebSockets") {
       .then([&]() { return backPipe.ends[1]->write({WEBSOCKET_REPLY_MESSAGE}); })
       .then([&]() { return expectRead(*backPipe.ends[1], WEBSOCKET_SEND_CLOSE); })
       .then([&]() { return backPipe.ends[1]->write({WEBSOCKET_REPLY_CLOSE}); })
-      // expect EOF
-      .then([&]() { return backPipe.ends[1]->readAllBytes(); })
-      .then([&](kj::ArrayPtr<byte> content) {
-        KJ_EXPECT(content.size() == 0);
-        // Send EOF.
-        backPipe.ends[1]->shutdownWrite();
-      })
       .eagerlyEvaluate([](kj::Exception&& e) { KJ_LOG(ERROR, e); });
 
   {
diff --git a/c++/src/kj/compat/http.c++ b/c++/src/kj/compat/http.c++
index 9c8593cac4bc76fa09da28cbc99a04bcb157c46c..18c0fe43af5ca87ed7495b0f07a6dab21828f6e9 100644
--- a/c++/src/kj/compat/http.c++
+++ b/c++/src/kj/compat/http.c++
@@ -2484,9 +2484,9 @@ static kj::Promise<void> pumpWebSocketLoop(WebSocket& from, WebSocket& to) {
             .then([&from,&to]() { return pumpWebSocketLoop(from, to); });
       }
       KJ_CASE_ONEOF(close, WebSocket::Close) {
+        // Once a close has passed through, the pump is complete.
         return to.close(close.code, close.reason)
-            .attach(kj::mv(close))
-            .then([&from,&to]() { return pumpWebSocketLoop(from, to); });
+            .attach(kj::mv(close));
       }
     }
     KJ_UNREACHABLE;