Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Apr 30, 2019
1 parent 00d8101 commit c03a4d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Firebase_Arduino_WiFi101.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ bool Firebase_Arduino_WiFi101::getServerResponse(FirebaseData &dataObj)

if (!dataObj._http.http_connected() || dataObj._interruptRequest)
return cancelCurrentResponse(dataObj);
if (!handleTCPNotConnected(dataObj) || !dataObj._httpConnected)
if (!handleNetClientNotConnected(dataObj) || !dataObj._httpConnected)
return false;

bool flag = false;
Expand Down Expand Up @@ -572,7 +572,7 @@ bool Firebase_Arduino_WiFi101::getServerResponse(FirebaseData &dataObj)
uint16_t charPos = 0;

if (!dataObj._isStream)
while (client.connected() && !client.available() && millis() - dataTime < dataObj._http.tcpTimeout)
while (client.connected() && !client.available() && millis() - dataTime < dataObj._http.netClientTimeout)
delay(1);

dataTime = millis();
Expand Down Expand Up @@ -732,7 +732,7 @@ bool Firebase_Arduino_WiFi101::getServerResponse(FirebaseData &dataObj)
charPos = 0;
}

if (millis() - dataTime > dataObj._http.tcpTimeout)
if (millis() - dataTime > dataObj._http.netClientTimeout)
{
//cancelCurrentResponse(dataObj);
dataObj._httpCode = HTTPC_ERROR_READ_TIMEOUT;
Expand Down Expand Up @@ -1300,7 +1300,7 @@ void Firebase_Arduino_WiFi101::resetFirebasedataFlag(FirebaseData &dataObj)
dataObj._dataAvailable = false;
memset(dataObj._pushName, 0, FBDATA_PUSH_NAME_LENGTH);
}
bool Firebase_Arduino_WiFi101::handleTCPNotConnected(FirebaseData &dataObj)
bool Firebase_Arduino_WiFi101::handleNetClientNotConnected(FirebaseData &dataObj)
{
if (!dataObj._http.http_connected())
{
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase_Arduino_WiFi101.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class Firebase_Arduino_WiFi101

void sendHeader(FirebaseData &dataObj, const char *host, uint8_t _method, const char *path, const char *auth, uint16_t payloadLength);
void resetFirebasedataFlag(FirebaseData &dataObj);
bool handleTCPNotConnected(FirebaseData &dataObj);
bool handleNetClientNotConnected(FirebaseData &dataObj);
void forceEndHTTP(FirebaseData &dataObj);
int firebaseConnect(FirebaseData &dataObj, const char *path, const uint8_t method, uint8_t dataType, const char *payload);
bool cancelCurrentResponse(FirebaseData &dataObj);
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase_Arduino_WiFi101_HTTPCLient.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class FirebaseHTTPClient
bool http_connected(void);
int http_sendRequest(const char *header, const char *payload);
WiFiSSLClient client;
uint16_t tcpTimeout = 5000;
uint16_t netClientTimeout = 5000;

protected:
bool http_connect(void);
Expand Down

0 comments on commit c03a4d9

Please sign in to comment.