Skip to content

Commit 67903f6

Browse files
jasnellcjihrig
authored andcommitted
quic: clarifying code comments
PR-URL: #34283 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 86597db commit 67903f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/internal/quic/core.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,13 @@ class QuicEndpoint {
717717

718718
this[kHandle] = undefined;
719719
handle[owner_symbol] = undefined;
720+
// Calling waitForPendingCallbacks starts the process of
721+
// closing down the QuicEndpoint. Once all pending writes
722+
// to the underlying libuv udp handle have completed, the
723+
// ondone callback will be invoked, triggering the UDP
724+
// socket to be closed. Once it is closed, we notify
725+
// the QuicSocket that this QuicEndpoint has been closed,
726+
// allowing it to be freed.
720727
handle.ondone = () => {
721728
state.udpSocket.close((err) => {
722729
if (err) error = err;
@@ -747,6 +754,7 @@ class QuicEndpoint {
747754
return {};
748755
}
749756

757+
// On Windows, this always returns undefined.
750758
get fd() {
751759
return this[kInternalState].fd >= 0 ?
752760
this[kInternalState].fd : undefined;

0 commit comments

Comments
 (0)