We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edc75e4 commit 26f6253Copy full SHA for 26f6253
1 file changed
src/AsyncEventSource.cpp
@@ -243,7 +243,7 @@ bool AsyncEventSourceClient::_queueMessage(AsyncEvent_SharedData_t &&msg) {
243
forcing Q run will only eat more heap ram and blow the buffer, let's just keep data in our own queue
244
the queue will be processed at least on each onAck()/onPoll() call from AsyncTCP
245
*/
246
- if (_messageQueue.size() < SSE_MAX_QUEUED_MESSAGES >> 2 && _client->canSend()) {
+ if (_messageQueue.size() < SSE_MAX_QUEUED_MESSAGES >> 2 && _client && _client->canSend()) {
247
_runQueue();
248
}
249
return true;
@@ -334,7 +334,7 @@ void AsyncEventSourceClient::_runQueue() {
334
335
336
// flush socket
337
- if (total_bytes_written) {
+ if (total_bytes_written && _client) {
338
_client->send();
339
340
0 commit comments