From a9ab1486e5ed6f7d4954f26dc35f9415afbd8e96 Mon Sep 17 00:00:00 2001 From: rucebee Date: Fri, 4 Oct 2019 14:57:33 +0300 Subject: [PATCH] Update ESPAsyncTCPbuffer.cpp In my project sometimes it fails to handle response. I propose not to check client connected on RX No side effects revealed --- src/ESPAsyncTCPbuffer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ESPAsyncTCPbuffer.cpp b/src/ESPAsyncTCPbuffer.cpp index d2261da..e45681a 100644 --- a/src/ESPAsyncTCPbuffer.cpp +++ b/src/ESPAsyncTCPbuffer.cpp @@ -386,7 +386,8 @@ void AsyncTCPbuffer::_sendBuffer() { * @param len */ void AsyncTCPbuffer::_rxData(uint8_t *buf, size_t len) { - if(!_client || !_client->connected()) { + //FIX do not check connected here, otherwise miss responce + if(!_client/* || !_client->connected()*/) { DEBUG_ASYNC_TCP("[A-TCP] not connected!\n"); return; } @@ -447,7 +448,8 @@ void AsyncTCPbuffer::_rxData(uint8_t *buf, size_t len) { * */ size_t AsyncTCPbuffer::_handleRxBuffer(uint8_t *buf, size_t len) { - if(!_client || !_client->connected() || _RXbuffer == NULL) { + //FIX do not check connected here, otherwise miss resonce + if(!_client/* || !_client->connected()*/ || _RXbuffer == NULL) { return 0; }