diff --git a/src/main/runtime/rpc/dispatcher.ts b/src/main/runtime/rpc/dispatcher.ts index 7a19314ace4..435a42f6afd 100644 --- a/src/main/runtime/rpc/dispatcher.ts +++ b/src/main/runtime/rpc/dispatcher.ts @@ -46,7 +46,7 @@ export class RpcDispatcher { } async dispatch(request: RpcRequest, options?: DispatchCallOptions): Promise { - const meta = this.meta() + const meta: RpcEnvelopeMeta = { runtimeId: this.runtime.getRuntimeId() } const method = this.registry.get(request.method) if (!method) { return errorResponse( @@ -166,7 +166,7 @@ export class RpcDispatcher { reply: (response: string) => void, options?: RpcDispatchStreamingOptions ): Promise { - const meta = this.meta() + const meta: RpcEnvelopeMeta = { runtimeId: this.runtime.getRuntimeId() } const method = this.registry.get(request.method) if (!method) { reply( @@ -312,8 +312,4 @@ export class RpcDispatcher { reply(JSON.stringify(mapDispatcherError(request, meta, error))) } } - - private meta(): RpcEnvelopeMeta { - return { runtimeId: this.runtime.getRuntimeId() } - } }