Skip to content

Commit 97800e9

Browse files
committed
fix TODO
1 parent 530fb44 commit 97800e9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/internal/inspector/network_undici.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ function onClientResponseFinish({ request }) {
206206
});
207207
}
208208

209+
// TODO: Move Network.webSocketCreated to the actual creation time of the WebSocket.
210+
// undici:websocket:open fires when the connection is established, but this results
211+
// in an inaccurate stack trace.
209212
function onWebSocketOpen({ websocket }) {
210213
websocket[kInspectorRequestId] = getNextRequestId();
211214
const url = websocket.url.toString();
@@ -214,6 +217,7 @@ function onWebSocketOpen({ websocket }) {
214217
url,
215218
});
216219
// TODO: Use handshake response data from undici diagnostics when available.
220+
// https://github.com/nodejs/undici/pull/4396
217221
Network.webSocketHandshakeResponseReceived({
218222
requestId: websocket[kInspectorRequestId],
219223
timestamp: getMonotonicTime(),

0 commit comments

Comments
 (0)