Skip to content

Commit b8945ba

Browse files
committed
quic: clarifying code comments
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 429ab1d commit b8945ba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/internal/quic/core.js

+8
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)