Skip to content

Commit

Permalink
chore: misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Nov 7, 2024
1 parent 7b929a6 commit a5f485c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/event-stream/event-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ export async function startEventServer(opts: {
version: req.headers?.['accept-version'] as string,
hostname: req.hostname,
remoteAddress: req.ip,
remotePort: req.socket ? req.socket.remotePort : undefined,
remotePort: req.socket?.remotePort,
bodySize: parseInt(req.headers?.['content-length'] as string) || 'unknown',
});

Expand All @@ -777,8 +777,7 @@ export async function startEventServer(opts: {
statusCode: reply.statusCode,
method: reply.request?.method,
url: reply.request?.url,
requestBodySize:
parseInt(reply.request?.headers?.['content-length'] as string) || 'unknown',
requestBodySize: parseInt(reply.request?.headers['content-length'] as string) || 'unknown',
responseBodySize: parseInt(reply.getHeader?.('content-length') as string) || 'unknown',
}),
},
Expand Down

0 comments on commit a5f485c

Please sign in to comment.