Commit 1325f3c2 authored by Kenton Varda's avatar Kenton Varda

Comment changes suggested by @harrishancock.

parent 9201d8c4
......@@ -113,7 +113,10 @@ public:
// work early when it is detected that no one will receive the result.
//
// Note that not all streams are able to detect this condition without actually performing a
// write(); such stream implementations may return a promise that never resolves.
// write(); such stream implementations may return a promise that never resolves. (In particular,
// as of this writing, whenWriteDisconnected() is not implemented on Windows. Also, for TCP
// streams, not all disconnects are detectable -- a power or network failure may lead the
// connection to hang forever, or until configured socket options lead to a timeout.)
//
// Unlike most other asynchronous stream methods, it is safe to call whenWriteDisconnected()
// multiple times without canceling the previous promises.
......
......@@ -27,7 +27,7 @@
#include <map>
#if KJ_HTTP_TEST_USE_OS_PIPE
// Run the test using OS-leve socketpairs. (See http-socketpair-test.c++.)
// Run the test using OS-level socketpairs. (See http-socketpair-test.c++.)
#define KJ_HTTP_TEST_SETUP_IO \
auto io = kj::setupAsyncIo(); \
auto& waitScope = io.waitScope
......@@ -2565,7 +2565,7 @@ private:
kj::Maybe<kj::Own<kj::PromiseFulfiller<void>>> onCancelFulfiller;
};
KJ_TEST("HttpServer disconnects ") {
KJ_TEST("HttpServer cancels request when client disconnects") {
KJ_HTTP_TEST_SETUP_IO;
kj::TimerImpl timer(kj::origin<kj::TimePoint>());
auto pipe = KJ_HTTP_TEST_CREATE_2PIPE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment