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 {
|
getPeer(): string {
|
||||||
const socket = this.stream.session.socket;
|
const socket = this.stream.session?.socket;
|
||||||
if (socket.remoteAddress) {
|
if (socket?.remoteAddress) {
|
||||||
if (socket.remotePort) {
|
if (socket.remotePort) {
|
||||||
return `${socket.remoteAddress}:${socket.remotePort}`;
|
return `${socket.remoteAddress}:${socket.remotePort}`;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue