Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/ch21-01-single-threaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,17 @@ It could also be that the browser is trying to connect to the server multiple
times because the server isn’t responding with any data. When `stream` goes out
of scope and is dropped at the end of the loop, the connection is closed as
part of the `drop` implementation. Browsers sometimes deal with closed
connections by retrying, because the problem might be temporary. The important
factor is that we’ve successfully gotten a handle to a TCP connection!
connections by retrying, because the problem might be temporary.

Browsers also sometimes open multiple connections to the server without sending
any requests, so that if they *do* later send requests, they can happen faster.
When this happens, our server will see each connection, regardless of whether
there are any requests over that connection. Many versions of Chrome-based
browsers do this, for example; you can disable that optimization by using =
private browsing mode or use a different browser.

The important factor is that we’ve successfully gotten a handle to a TCP
connection!

Remember to stop the program by pressing <kbd>ctrl</kbd>-<kbd>c</kbd> when
you’re done running a particular version of the code. Then restart the program
Expand Down