v1.9.2 not to reconnect after connected
### Releases v1.9.2 1. Not try to reconnect to the same host:port after connected. Check [setReuse feature #12](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/issues/12) 2. Update `Packages' Patches`
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
//char GET_ServerAddress[] = "192.168.2.110/";
|
||||
char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt";
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
@@ -35,8 +35,8 @@ const char GET_ServerAddress[] = "dweet.io";
|
||||
// use your own thing name here
|
||||
String dweetName = "/dweet/for/currentSecond?second=";
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
@@ -29,8 +29,8 @@ const char POST_ServerAddress[] = "dweet.io";
|
||||
// use your own thing name here
|
||||
String dweetName = "/dweet/for/pinA0-Read?";
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
#define _ASYNC_HTTP_LOGLEVEL_ 1
|
||||
#define _ASYNC_HTTP_LOGLEVEL_ 3
|
||||
|
||||
// 300s = 5 minutes to not flooding
|
||||
#define HTTP_REQUEST_INTERVAL 60 //300
|
||||
@@ -65,8 +65,8 @@ const char* password = "your_pass";
|
||||
#include <WiFi.h>
|
||||
#endif
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
|
||||
@@ -95,8 +95,8 @@ using TCPClient = WiFiClient;
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
|
||||
@@ -139,15 +139,14 @@ void sendRequests()
|
||||
reqCount[1] = NUM_ENTRIES_SITE_1;
|
||||
}
|
||||
|
||||
|
||||
void requestCB0(void* optParm, AsyncHTTPRequest* thisRequest, int readyState)
|
||||
{
|
||||
(void) optParm;
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
AHTTP_LOGERROR(F("\n**************************************"));
|
||||
AHTTP_LOGERROR1(F("Response Code = "), request->responseHTTPString());
|
||||
AHTTP_LOGWARN(F("\n**************************************"));
|
||||
AHTTP_LOGWARN1(F("Response Code = "), request->responseHTTPString());
|
||||
|
||||
if (request->responseHTTPcode() == 200)
|
||||
{
|
||||
@@ -171,8 +170,8 @@ void requestCB1(void* optParm, AsyncHTTPRequest* thisRequest, int readyState)
|
||||
|
||||
if (readyState == readyStateDone)
|
||||
{
|
||||
AHTTP_LOGERROR(F("\n**************************************"));
|
||||
AHTTP_LOGERROR1(F("Response Code = "), request->responseHTTPString());
|
||||
AHTTP_LOGWARN(F("\n**************************************"));
|
||||
AHTTP_LOGWARN1(F("Response Code = "), request->responseHTTPString());
|
||||
|
||||
if (request->responseHTTPcode() == 200)
|
||||
{
|
||||
@@ -207,7 +206,7 @@ void setup()
|
||||
|
||||
while (WiFi.status() != WL_CONNECTED)
|
||||
{
|
||||
delay(500);
|
||||
delay(1000);
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
@@ -231,12 +230,11 @@ void loop()
|
||||
for (int index = 0; index < NUM_DIFFERENT_SITES; index++)
|
||||
{
|
||||
if ((reqCount[index] > 0) && readySend[index])
|
||||
// OK but have to use delay(100)
|
||||
//if ( reqCount[index] > 0 )
|
||||
{
|
||||
sendRequestCB[index]();
|
||||
|
||||
//delay(100);
|
||||
|
||||
// Don't send too fast
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.14.0"
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1014000
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.15.0"
|
||||
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN 1015000
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// Level from 0-4
|
||||
#define ASYNC_HTTP_DEBUG_PORT Serial
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
//char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/";
|
||||
char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt";
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
@@ -26,8 +26,8 @@ const char GET_ServerAddress[] = "arduino.tips";
|
||||
// GET location
|
||||
String GET_Location = "/asciilogo.txt";
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// 600s = 10 minutes to not flooding, 60s in testing
|
||||
#define HTTP_REQUEST_INTERVAL_MS 60000 //600000
|
||||
|
||||
+2
-2
@@ -57,8 +57,8 @@
|
||||
|
||||
#include <WebServer_WT32_ETH01.h> // https://github.com/khoih-prog/WebServer_WT32_ETH01
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
|
||||
#include <WebServer_WT32_ETH01.h> // https://github.com/khoih-prog/WebServer_WT32_ETH01
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
|
||||
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#error This code is intended to run on the ESP8266, ESP32 or STM32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.1"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009001
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN_TARGET "AsyncHTTPRequest_Generic v1.9.2"
|
||||
#define ASYNC_HTTP_REQUEST_GENERIC_VERSION_MIN 1009002
|
||||
|
||||
#include "multiFileProject.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user