mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
grpc-js: Fix compilation error from new @types/node version
This commit is contained in:
parent
2e9060385c
commit
42a02749eb
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user