Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 2dd655f

Browse files
committed
Stop transcriber from trying to do anything if the wifi is not connected, unsupported state.
1 parent 43c6a3c commit 2dd655f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/thing/Transcriber.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
21
#include "thing/Transcriber.h"
2+
#include <ESP8266WiFi.h>
33

44
namespace thing {
55
namespace {
@@ -37,6 +37,10 @@ void Transcriber::SetValue(const std::string& path, const std::string& value) {
3737
}
3838

3939
void Transcriber::Loop() {
40+
if (WiFi.status() != WL_CONNECTED) {
41+
return;
42+
}
43+
4044
// Read incoming data
4145
if (stream_->available()) {
4246
std::string event_str;

0 commit comments

Comments
 (0)