@dxos/network-manager 0.3.9-main.b7e6a67 → 0.3.9-main.dd8d283

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.
@@ -3417,16 +3417,21 @@ var LibDataChannelTransport = class {
3417
3417
  const duplex = new Duplex2({
3418
3418
  read: () => {
3419
3419
  },
3420
- write: (chunk, encoding, callback) => {
3420
+ write: async (chunk, encoding, callback) => {
3421
3421
  if (chunk.length > MAX_MESSAGE_SIZE) {
3422
3422
  this.errors.raise(new Error(`message too large: ${chunk.length} > ${MAX_MESSAGE_SIZE}`));
3423
3423
  }
3424
- dataChannel.send(chunk);
3424
+ try {
3425
+ dataChannel.send(chunk);
3426
+ } catch (err) {
3427
+ this.errors.raise(err);
3428
+ await this._close();
3429
+ }
3425
3430
  if (this._channel.bufferedAmount > MAX_BUFFERED_AMOUNT) {
3426
3431
  if (this._writeCallback !== null) {
3427
3432
  log14.error("consumer trying to write before we're ready for more data", void 0, {
3428
3433
  F: __dxlog_file15,
3429
- L: 139,
3434
+ L: 143,
3430
3435
  S: this,
3431
3436
  C: (f, a) => f(...a)
3432
3437
  });
@@ -3451,7 +3456,7 @@ var LibDataChannelTransport = class {
3451
3456
  err
3452
3457
  }, {
3453
3458
  F: __dxlog_file15,
3454
- L: 159,
3459
+ L: 163,
3455
3460
  S: this,
3456
3461
  C: (f, a) => f(...a)
3457
3462
  });
@@ -3488,7 +3493,7 @@ var LibDataChannelTransport = class {
3488
3493
  peer
3489
3494
  }, {
3490
3495
  F: __dxlog_file15,
3491
- L: 194,
3496
+ L: 198,
3492
3497
  S: this,
3493
3498
  C: (f, a) => f(...a)
3494
3499
  });
@@ -3516,7 +3521,7 @@ var LibDataChannelTransport = class {
3516
3521
  err
3517
3522
  }, {
3518
3523
  F: __dxlog_file15,
3519
- L: 205,
3524
+ L: 209,
3520
3525
  S: this,
3521
3526
  C: (f, a) => f(...a)
3522
3527
  });
@@ -3536,7 +3541,7 @@ var LibDataChannelTransport = class {
3536
3541
  err
3537
3542
  }, {
3538
3543
  F: __dxlog_file15,
3539
- L: 216,
3544
+ L: 220,
3540
3545
  S: this,
3541
3546
  C: (f, a) => f(...a)
3542
3547
  });
@@ -3555,7 +3560,7 @@ var LibDataChannelTransport = class {
3555
3560
  signal
3556
3561
  }, {
3557
3562
  F: __dxlog_file15,
3558
- L: 227,
3563
+ L: 231,
3559
3564
  S: this,
3560
3565
  C: (f, a) => f(...a)
3561
3566
  });
@@ -3564,7 +3569,7 @@ var LibDataChannelTransport = class {
3564
3569
  }).catch((err) => {
3565
3570
  log14.catch(err, void 0, {
3566
3571
  F: __dxlog_file15,
3567
- L: 232,
3572
+ L: 236,
3568
3573
  S: this,
3569
3574
  C: (f, a) => f(...a)
3570
3575
  });
@@ -3657,4 +3662,4 @@ export {
3657
3662
  TcpTransport,
3658
3663
  createTeleportProtocolFactory
3659
3664
  };
3660
- //# sourceMappingURL=chunk-LA2ACGLR.mjs.map
3665
+ //# sourceMappingURL=chunk-QJNZBY3Q.mjs.map