Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
1325f3c2
Commit
1325f3c2
authored
Jan 22, 2019
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment changes suggested by @harrishancock.
parent
9201d8c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
async-io.h
c++/src/kj/async-io.h
+4
-1
http-test.c++
c++/src/kj/compat/http-test.c++
+2
-2
No files found.
c++/src/kj/async-io.h
View file @
1325f3c2
...
...
@@ -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.
...
...
c++/src/kj/compat/http-test.c++
View file @
1325f3c2
...
...
@@ -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-leve
l
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment