Skip to content

Commit 05d9257

Browse files
authored
fix for compile error: 'ets_printf' was not declared in this scope
1 parent 6d2540d commit 05d9257

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AsyncEventSource.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,12 @@ void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage *dataMessage)
185185
return;
186186
}
187187
if(_messageQueue.length() >= SSE_MAX_QUEUED_MESSAGES){
188+
#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
189+
log_e("ERROR: Too many messages queued\n");
190+
#else
188191
ets_printf("ERROR: Too many messages queued\n");
189-
delete dataMessage;
192+
#endif
193+
delete dataMessage;
190194
} else {
191195
_messageQueue.add(dataMessage);
192196
}

0 commit comments

Comments
 (0)