Skip to content

Commit

Permalink
grpc-js: Fix compilation error from new @types/node version
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Jul 24, 2023
1 parent 2e90603 commit 42a0274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grpc-js/src/server-call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,8 @@ export class Http2ServerCallStream<
}

getPeer(): string {
const socket = this.stream.session.socket;
if (socket.remoteAddress) {
const socket = this.stream.session?.socket;
if (socket?.remoteAddress) {
if (socket.remotePort) {
return `${socket.remoteAddress}:${socket.remotePort}`;
} else {
Expand Down

0 comments on commit 42a0274

Please sign in to comment.