Skip to content

Commit 28c18ec

Browse files
committed
stop if connection could not be establshed
1 parent 50797a8 commit 28c18ec

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Audio.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*
44
* Created on: Oct 28.2018
55
*
6-
* Version 3.0.13z
7-
* Updated on: Dec 15.2024
6+
* Version 3.0.13za
7+
* Updated on: Dec 26.2024
88
* Author: Wolle (schreibfaul1)
99
*
1010
*/
@@ -606,6 +606,11 @@ bool Audio::connecttohost(const char* host, const char* user, const char* pwd) {
606606
AUDIO_INFO("%s has been established in %lu ms, free Heap: %lu bytes", m_f_ssl ? "SSL" : "Connection", (long unsigned int)dt, (long unsigned int)ESP.getFreeHeap());
607607
m_f_running = true;
608608
}
609+
else {
610+
AUDIO_INFO("%s could not be established, free Heap: %lu bytes", m_f_ssl ? "SSL" : "Connection", (long unsigned int)ESP.getFreeHeap());
611+
m_f_running = false;
612+
goto exit;
613+
}
609614

610615
m_expectedCodec = CODEC_NONE;
611616
m_expectedPlsFmt = FORMAT_NONE;

0 commit comments

Comments
 (0)