grpc-libp2p-client 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/grpc.js CHANGED
@@ -3761,7 +3761,6 @@
3761
3761
  });
3762
3762
  writer_1.addEventListener("drain", function (e) {
3763
3763
  var d = (e === null || e === void 0 ? void 0 : e.detail) || {};
3764
- console.debug("[unary stream ".concat(streamId_1, "] drain drained=").concat(d.drained, " queue=").concat(d.queueSize));
3765
3764
  });
3766
3765
  writer_1.addEventListener("stalled", function (e) {
3767
3766
  var _a;
@@ -3785,6 +3784,8 @@
3785
3784
  if (state) {
3786
3785
  _this.rejectStreamWaiters(state, new Error("Connection received GOAWAY"));
3787
3786
  }
3787
+ exitFlag = true;
3788
+ errMsg = "GOAWAY received: code=".concat(info.errorCode);
3788
3789
  try {
3789
3790
  (_a = connection === null || connection === void 0 ? void 0 : connection.close) === null || _a === void 0 ? void 0 : _a.call(connection);
3790
3791
  }
@@ -4121,7 +4122,7 @@
4121
4122
  _s.label = 7;
4122
4123
  case 7:
4123
4124
  _s.trys.push([7, 9, , 10]);
4124
- return [4 /*yield*/, this.waitForStreamSlot(state, internalController.signal, 10000)];
4125
+ return [4 /*yield*/, this.waitForStreamSlot(state, internalController.signal, timeout)];
4125
4126
  case 8:
4126
4127
  _s.sent();
4127
4128
  state.activeStreams += 1;
@@ -4179,6 +4180,10 @@
4179
4180
  if (state) {
4180
4181
  _this.rejectStreamWaiters(state, new Error("Connection received GOAWAY"));
4181
4182
  }
4183
+ if (onErrorCallback) {
4184
+ onErrorCallback(new Error("GOAWAY received: code=".concat(info.errorCode)));
4185
+ }
4186
+ internalController.abort();
4182
4187
  try {
4183
4188
  (_a = connection === null || connection === void 0 ? void 0 : connection.close) === null || _a === void 0 ? void 0 : _a.call(connection);
4184
4189
  }