egos-transfer 0.2.13 → 0.2.14
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/peer-transfer.js +8 -2
- package/package.json +1 -1
- package/src/peer-transfer.ts +8 -2
package/dist/peer-transfer.js
CHANGED
|
@@ -511,7 +511,10 @@ class PeerTransfer {
|
|
|
511
511
|
// ── Router integration ──────────────────────────────────────────
|
|
512
512
|
onRequest(conn, message) {
|
|
513
513
|
return __awaiter(this, void 0, void 0, function* () {
|
|
514
|
-
|
|
514
|
+
var _a;
|
|
515
|
+
if (((_a = this.peerConfig) === null || _a === void 0 ? void 0 : _a.debug) >= 2) {
|
|
516
|
+
console.info('onRequest===>', message.route);
|
|
517
|
+
}
|
|
515
518
|
// this.resetIdleTimer();
|
|
516
519
|
try {
|
|
517
520
|
yield this.router.run(conn, message);
|
|
@@ -523,7 +526,10 @@ class PeerTransfer {
|
|
|
523
526
|
}
|
|
524
527
|
onResponse(_conn, message) {
|
|
525
528
|
return __awaiter(this, void 0, void 0, function* () {
|
|
526
|
-
|
|
529
|
+
var _a;
|
|
530
|
+
if (((_a = this.peerConfig) === null || _a === void 0 ? void 0 : _a.debug) >= 2) {
|
|
531
|
+
console.info('onResponse<====', message.route);
|
|
532
|
+
}
|
|
527
533
|
// this.resetIdleTimer();
|
|
528
534
|
// 优先检查 health check ping 回调
|
|
529
535
|
const cb = this.requests.get(message.requestId);
|
package/package.json
CHANGED
package/src/peer-transfer.ts
CHANGED
|
@@ -605,7 +605,10 @@ export abstract class PeerTransfer {
|
|
|
605
605
|
// ── Router integration ──────────────────────────────────────────
|
|
606
606
|
|
|
607
607
|
async onRequest(conn: DataConnection, message: PeerMessage) {
|
|
608
|
-
|
|
608
|
+
if (this.peerConfig?.debug >= 2) {
|
|
609
|
+
console.info('onRequest===>', message.route);
|
|
610
|
+
}
|
|
611
|
+
|
|
609
612
|
// this.resetIdleTimer();
|
|
610
613
|
try {
|
|
611
614
|
await this.router.run(conn, message);
|
|
@@ -615,7 +618,10 @@ export abstract class PeerTransfer {
|
|
|
615
618
|
}
|
|
616
619
|
|
|
617
620
|
async onResponse(_conn: DataConnection, message: PeerMessage) {
|
|
618
|
-
|
|
621
|
+
if (this.peerConfig?.debug >= 2) {
|
|
622
|
+
console.info('onResponse<====', message.route);
|
|
623
|
+
}
|
|
624
|
+
|
|
619
625
|
// this.resetIdleTimer();
|
|
620
626
|
// 优先检查 health check ping 回调
|
|
621
627
|
const cb = this.requests.get(message.requestId);
|