@mtcute/core 0.20.2 → 0.20.3
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.
|
@@ -172,7 +172,8 @@ class PersistentConnection {
|
|
|
172
172
|
try {
|
|
173
173
|
await this._writer.write(data);
|
|
174
174
|
} catch (e) {
|
|
175
|
-
this.log.warn("encountered an error
|
|
175
|
+
this.log.warn("encountered an error while sending, reconnecting: %e", e);
|
|
176
|
+
this._writer = void 0;
|
|
176
177
|
this._fuman.reconnect(true);
|
|
177
178
|
this._sendOnceConnected.push(data);
|
|
178
179
|
}
|
|
@@ -165,7 +165,8 @@ class PersistentConnection {
|
|
|
165
165
|
try {
|
|
166
166
|
await this._writer.write(data);
|
|
167
167
|
} catch (e) {
|
|
168
|
-
this.log.warn("encountered an error
|
|
168
|
+
this.log.warn("encountered an error while sending, reconnecting: %e", e);
|
|
169
|
+
this._writer = void 0;
|
|
169
170
|
this._fuman.reconnect(true);
|
|
170
171
|
this._sendOnceConnected.push(data);
|
|
171
172
|
}
|