mirror of https://github.com/grpc/grpc-node.git
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…
Reference in New Issue