Skip to content

Commit

Permalink
quic: clarifying code comments
Browse files Browse the repository at this point in the history
PR-URL: #34283
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
jasnell committed Jul 16, 2020
1 parent 429ab1d commit b8945ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/internal/quic/core.js
Expand Up @@ -717,6 +717,13 @@ class QuicEndpoint {

this[kHandle] = undefined;
handle[owner_symbol] = undefined;
// Calling waitForPendingCallbacks starts the process of
// closing down the QuicEndpoint. Once all pending writes
// to the underlying libuv udp handle have completed, the
// ondone callback will be invoked, triggering the UDP
// socket to be closed. Once it is closed, we notify
// the QuicSocket that this QuicEndpoint has been closed,
// allowing it to be freed.
handle.ondone = () => {
state.udpSocket.close((err) => {
if (err) error = err;
Expand Down Expand Up @@ -747,6 +754,7 @@ class QuicEndpoint {
return {};
}

// On Windows, this always returns undefined.
get fd() {
return this[kInternalState].fd >= 0 ?
this[kInternalState].fd : undefined;
Expand Down

0 comments on commit b8945ba

Please sign in to comment.