From 51e222caca09e874ed833cd94720867aae2c9152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Suwa=C5=82a?= Date: Thu, 5 Nov 2020 23:36:41 +0100 Subject: [PATCH] fix based on pullrequest #128 --- README.md | 1 + src/ESPAsyncTCPbuffer.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f84b60..7311b38 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ### Fixes - callbecks to error and disconnect handlers are ommited if one of closing methods was called +- pullrequest #128 - Update ESPAsyncTCPbuffer.cpp - missing response ### Async TCP Library for ESP8266 Arduino diff --git a/src/ESPAsyncTCPbuffer.cpp b/src/ESPAsyncTCPbuffer.cpp index d2261da..b03989b 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 responce + if(!_client /*|| !_client->connected()*/ || _RXbuffer == NULL) { return 0; }