Skip to content

Commit 4886eb7

Browse files
committed
Fixed a connection reset during updating. #325
1 parent 3dd3526 commit 4886eb7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AutoConnectOTA.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ size_t AutoConnectOTA::_write(const uint8_t *buf, const size_t size) {
278278
* @param status Updater binary upload completion status.
279279
*/
280280
void AutoConnectOTA::_close(const HTTPUploadStatus status) {
281-
AC_DBG("OTA up%s ", _dest == OTA_DEST_FIRM ? "date" : "load");
281+
AC_DBG("Closing OTA up%s, status=%d\n", _dest == OTA_DEST_FIRM ? "date" : "load", status);
282282

283283
// The _close will perform different processes depending on the update
284284
// destination. The _close process for firmware updates purges the
@@ -288,7 +288,7 @@ void AutoConnectOTA::_close(const HTTPUploadStatus status) {
288288
if (_dest == OTA_DEST_FIRM) {
289289
if (!Update.end(bc)) {
290290
_setError();
291-
AC_DBG_DUMB("failed to flash");
291+
AC_DBG("Failed to flash");
292292
}
293293
}
294294
else {
@@ -299,11 +299,11 @@ void AutoConnectOTA::_close(const HTTPUploadStatus status) {
299299
if (!_err.length()) {
300300
if (bc) {
301301
_otaStatus = AC_OTA_SUCCESS;
302-
AC_DBG_DUMB("end");
302+
AC_DBG("OTA end");
303303
}
304304
else {
305305
_setError("Aborted");
306-
AC_DBG_DUMB("aborted");
306+
AC_DBG("OTA aborted");
307307
}
308308
}
309309
AC_DBG_DUMB(". %s\n", _err.c_str());

0 commit comments

Comments
 (0)