Closed
Description
Problem description
Client is in idle mode for almost 30 mins and after that If I made any calls I am able to see the response in streaming calls but for Unary calls it is not giving any response. So I thought it is problem with idle timers/deadlines for calls but how streaming is working when compare to the Unary calls. I tried below Keep alive options but still no luck. Is there any other way ?
Note : my client communication is happening via Named Pipes
Code
const sslCreds = this.electronService.grpc.credentials.createInsecure();
const keepAliveOptions = {
'grpc.idle_timeout_ms': 31536000000, // One year in milliseconds
'grpc.keepalive_time_ms':31536000000,
'grpc.keepalive_timeout_ms': 31536000000,
'grpc.keepalive_permit_without_calls':1,
}
this.scannerClient = new this.LittlePackage.GrpcService(this.periPheralPort, sslCreds,keepAliveOptions);
clientGetScanData(data) {
console.log('this.scannerClient', this.scannerClient);
this.scannerClient.GetScanData({
pmSessionId: data.sessionId,
transactionID: data.transactionId
}, this.metadata, async (err, res) => {
if (res) {
console.log('res', res);
}
})
}
Environment
- OS name - windows 11
- Node version - 16.14.0
- Node installation - exe manual installation
- Package name and version- [email protected]
Additional context
Observed the below option when I console the scannerClient
Metadata
Metadata
Assignees
Labels
No labels