Skip to content

Commit

Permalink
Add debugging code to help with issue #432.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Nov 10, 2024
1 parent 9c3e6c9 commit de388c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/net-protocol/export/ProtocolWrangler.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,16 @@ export class ProtocolWrangler {
return;
}

// Temporary code to try to diagnose why `context.remoteInfo` is sometimes
// invalid. Issue #432. TODO: Remove this once the issue is resolved.
{
const remoteInfo = context.remoteInfo;
if (typeof remoteInfo.address !== 'string') {
logger?.issue432(remoteInfo);
throw new Error(`Issue #432: ${inspect(remoteInfo)}`);
}
}

const requestContext = new RequestContext(this.interface, context.remoteInfo);
let request = null;

Expand Down

0 comments on commit de388c0

Please sign in to comment.