Socket
Socket
Sign inDemoInstall

@grpc/grpc-js

Package Overview
Dependencies
Maintainers
3
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc/grpc-js - npm Package Compare versions

Comparing version 1.6.6 to 1.6.7

1

build/src/backoff-timeout.js

@@ -86,2 +86,3 @@ "use strict";

var _a, _b;
clearTimeout(this.timerId);
this.timerId = setTimeout(() => {

@@ -88,0 +89,0 @@ this.callback();

@@ -177,3 +177,12 @@ "use strict";

if (status.code === constants_1.Status.OK) {
callProperties.callback(null, responseMessage);
if (responseMessage === null) {
callProperties.callback(call_1.callErrorFromStatus({
code: constants_1.Status.INTERNAL,
details: 'No message received',
metadata: status.metadata
}));
}
else {
callProperties.callback(null, responseMessage);
}
}

@@ -246,3 +255,12 @@ else {

if (status.code === constants_1.Status.OK) {
callProperties.callback(null, responseMessage);
if (responseMessage === null) {
callProperties.callback(call_1.callErrorFromStatus({
code: constants_1.Status.INTERNAL,
details: 'No message received',
metadata: status.metadata
}));
}
else {
callProperties.callback(null, responseMessage);
}
}

@@ -249,0 +267,0 @@ else {

18

build/src/resolver-dns.js

@@ -124,5 +124,6 @@ "use strict";

setImmediate(() => {
this.backoff.reset();
this.listener.onSuccessfulResolution(this.ipResult, null, null, null, {});
});
this.backoff.stop();
this.backoff.reset();
return;

@@ -139,4 +140,8 @@ }

});
this.stopNextResolutionTimer();
}
else {
if (this.pendingLookupPromise !== null) {
return;
}
trace('Looking up DNS hostname ' + this.dnsHostname);

@@ -230,2 +235,3 @@ /* We clear out latestLookupResult here to ensure that it contains the

var _a, _b;
clearTimeout(this.nextResolutionTimer);
this.nextResolutionTimer = (_b = (_a = setTimeout(() => {

@@ -244,6 +250,8 @@ this.stopNextResolutionTimer();

startResolutionWithBackoff() {
this.continueResolving = false;
this.startResolution();
this.backoff.runOnce();
this.startNextResolutionTimer();
if (this.pendingLookupPromise === null) {
this.continueResolving = false;
this.startResolution();
this.backoff.runOnce();
this.startNextResolutionTimer();
}
}

@@ -250,0 +258,0 @@ updateResolution() {

@@ -7,3 +7,2 @@ import { ChannelOptions } from './channel-options';

export declare class SubchannelPool {
private global;
private pool;

@@ -17,6 +16,4 @@ /**

* exact same parameters will be reused.
* @param global If true, this is the global subchannel pool. Otherwise, it
* is the pool for a single channel.
*/
constructor(global: boolean);
constructor();
/**

@@ -23,0 +20,0 @@ * Unrefs all unused subchannels and cancels the cleanup task if all

@@ -34,7 +34,4 @@ "use strict";

* exact same parameters will be reused.
* @param global If true, this is the global subchannel pool. Otherwise, it
* is the pool for a single channel.
*/
constructor(global) {
this.global = global;
constructor() {
this.pool = Object.create(null);

@@ -80,3 +77,3 @@ /**

var _a, _b;
if (this.global && this.cleanupTimer === null) {
if (this.cleanupTimer === null) {
this.cleanupTimer = setInterval(() => {

@@ -122,5 +119,3 @@ this.unrefUnusedSubchannels();

});
if (this.global) {
subchannel.ref();
}
subchannel.ref();
return subchannel;

@@ -130,3 +125,3 @@ }

exports.SubchannelPool = SubchannelPool;
const globalSubchannelPool = new SubchannelPool(true);
const globalSubchannelPool = new SubchannelPool();
/**

@@ -141,3 +136,3 @@ * Get either the global subchannel pool, or a new subchannel pool.

else {
return new SubchannelPool(false);
return new SubchannelPool();
}

@@ -144,0 +139,0 @@ }

@@ -588,3 +588,3 @@ "use strict";

}
this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING, connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE);
this.transitionToState([connectivity_state_1.ConnectivityState.CONNECTING, connectivity_state_1.ConnectivityState.READY], connectivity_state_1.ConnectivityState.IDLE);
if (this.channelzEnabled) {

@@ -591,0 +591,0 @@ channelz_1.unregisterChannelzRef(this.channelzRef);

{
"name": "@grpc/grpc-js",
"version": "1.6.6",
"version": "1.6.7",
"description": "gRPC Library for Node - pure JS implementation",

@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/",

@@ -103,2 +103,3 @@ /*

private runTimer(delay: number) {
clearTimeout(this.timerId);
this.timerId = setTimeout(() => {

@@ -105,0 +106,0 @@ this.callback();

@@ -341,3 +341,11 @@ /*

if (status.code === Status.OK) {
callProperties.callback!(null, responseMessage!);
if (responseMessage === null) {
callProperties.callback!(callErrorFromStatus({
code: Status.INTERNAL,
details: 'No message received',
metadata: status.metadata
}));
} else {
callProperties.callback!(null, responseMessage);
}
} else {

@@ -459,3 +467,11 @@ callProperties.callback!(callErrorFromStatus(status));

if (status.code === Status.OK) {
callProperties.callback!(null, responseMessage!);
if (responseMessage === null) {
callProperties.callback!(callErrorFromStatus({
code: Status.INTERNAL,
details: 'No message received',
metadata: status.metadata
}));
} else {
callProperties.callback!(null, responseMessage);
}
} else {

@@ -462,0 +478,0 @@ callProperties.callback!(callErrorFromStatus(status));

@@ -161,3 +161,2 @@ /*

setImmediate(() => {
this.backoff.reset();
this.listener.onSuccessfulResolution(

@@ -171,2 +170,4 @@ this.ipResult!,

});
this.backoff.stop();
this.backoff.reset();
return;

@@ -183,3 +184,7 @@ }

});
this.stopNextResolutionTimer();
} else {
if (this.pendingLookupPromise !== null) {
return;
}
trace('Looking up DNS hostname ' + this.dnsHostname);

@@ -305,2 +310,3 @@ /* We clear out latestLookupResult here to ensure that it contains the

private startNextResolutionTimer() {
clearTimeout(this.nextResolutionTimer);
this.nextResolutionTimer = setTimeout(() => {

@@ -321,2 +327,3 @@ this.stopNextResolutionTimer();

private startResolutionWithBackoff() {
if (this.pendingLookupPromise === null) {
this.continueResolving = false;

@@ -326,2 +333,3 @@ this.startResolution();

this.startNextResolutionTimer();
}
}

@@ -328,0 +336,0 @@

@@ -52,6 +52,4 @@ /*

* exact same parameters will be reused.
* @param global If true, this is the global subchannel pool. Otherwise, it
* is the pool for a single channel.
*/
constructor(private global: boolean) {}
constructor() {}

@@ -99,3 +97,3 @@ /**

ensureCleanupTask(): void {
if (this.global && this.cleanupTimer === null) {
if (this.cleanupTimer === null) {
this.cleanupTimer = setInterval(() => {

@@ -161,5 +159,3 @@ this.unrefUnusedSubchannels();

});
if (this.global) {
subchannel.ref();
}
subchannel.ref();
return subchannel;

@@ -169,3 +165,3 @@ }

const globalSubchannelPool = new SubchannelPool(true);
const globalSubchannelPool = new SubchannelPool();

@@ -180,4 +176,4 @@ /**

} else {
return new SubchannelPool(false);
return new SubchannelPool();
}
}

@@ -744,3 +744,3 @@ /*

[ConnectivityState.CONNECTING, ConnectivityState.READY],
ConnectivityState.TRANSIENT_FAILURE
ConnectivityState.IDLE
);

@@ -747,0 +747,0 @@ if (this.channelzEnabled) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc