Skip to content

Commit

Permalink
clarify comments around cancellation cases (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
chradek committed Apr 15, 2021
1 parent 7f7a08b commit 8873a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ export class Connection extends Entity {
// our `onOpen` handler should have executed and removed this abort listener.
// This is a 'just in case' check in case the operation was cancelled sometime
// between when the session's state was updated and when the sessionOpen
// event was emitted.
// event was handled.
rheaSession.close();
} else if (!rheaSession.is_closed()) {
// If the rheaSession isn't closed, then it's possible the peer will still
Expand Down
4 changes: 2 additions & 2 deletions lib/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class Session extends Entity {
// our `onOpen` handler should have executed and removed this abort listener.
// This is a 'just in case' check in case the operation was cancelled sometime
// between when the receiver's state was updated and when the receiverOpen
// event was emitted.
// event was handled.
rheaReceiver.close();
} else if (!rheaReceiver.is_closed()) {
// If the rheaReceiver isn't closed, then it's possible the peer will still
Expand Down Expand Up @@ -464,7 +464,7 @@ export class Session extends Entity {
// our `onOpen` handler should have executed and removed this abort listener.
// This is a 'just in case' check in case the operation was cancelled sometime
// between when the sender's state was updated and when the senderOpen
// event was emitted.
// event was handled.
rheaSender.close();
} else if (!rheaSender.is_closed()) {
// If the rheaSender isn't closed, then it's possible the peer will still
Expand Down

0 comments on commit 8873a97

Please sign in to comment.