Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
quic: clarifying code comments
  • Loading branch information
jasnell committed Jul 16, 2020
commit cc4674d34100efd9c90d1a2f29f8afc9f6a34f5c
8 changes: 8 additions & 0 deletions lib/internal/quic/core.js
Original file line number Diff line number Diff line change
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