Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

Commit d59701f

Browse files
committed
fix typo
1 parent d4cad34 commit d59701f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ Notice what happens with all of the channels once we exit the accept loop:
585585
Currently, we only ever _add_ new peers to the map.
586586
This is clearly wrong: if a peer closes connection to the chat, we should not try to send any more messages to it.
587587

588-
One subtlety with handing disconnection is that we can detect it either in the reader's task, or in the writer's task.
588+
One subtlety with handling disconnection is that we can detect it either in the reader's task, or in the writer's task.
589589
The most obvious solution here is to just remove the peer from the `peers` map in both cases, but this would be wrong.
590590
If _both_ read and write fail, we'll remove the peer twice, but it can be the case that the peer reconnected between the two failures!
591591
To fix this, we will only remove the peer when the write side finishes.

README.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ <h2 id="_handling_disconnections">Handling Disconnections</h2>
12291229
This is clearly wrong: if a peer closes connection to the chat, we should not try to send any more messages to it.</p>
12301230
</div>
12311231
<div class="paragraph">
1232-
<p>One subtlety with handing disconnection is that we can detect it either in the reader&#8217;s task, or in the writer&#8217;s task.
1232+
<p>One subtlety with handling disconnection is that we can detect it either in the reader&#8217;s task, or in the writer&#8217;s task.
12331233
The most obvious solution here is to just remove the peer from the <code>peers</code> map in both cases, but this would be wrong.
12341234
If <em>both</em> read and write fail, we&#8217;ll remove the peer twice, but it can be the case that the peer reconnected between the two failures!
12351235
To fix this, we will only remove the peer when the write side finishes.

0 commit comments

Comments
 (0)