GramJs: Log socket connection failure cause (#1299)

This commit is contained in:
Alexander Zinchuk 2021-07-20 15:47:55 +03:00
parent e032a8ff63
commit 4e4299bf39

View File

@ -182,7 +182,7 @@ class MTProtoSender {
if (this._updateCallback && attempt === 0) {
this._updateCallback(new UpdateConnectionState(UpdateConnectionState.disconnected));
}
this._log.error(`WebSocket connection failed attempt: ${attempt + 1}`);
this._log.error(`WebSocket connection failed attempt: ${attempt + 1}. Cause: ${err.message}`);
await Helpers.sleep(this._delay);
}
}