Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.3.1 not to reconnect after connected
Browse files Browse the repository at this point in the history
### Releases v1.3.1

1. Not try to reconnect to the same host:port after connected. Check [setReuse feature #12](khoih-prog/AsyncHTTPSRequest_Generic#12)
2. Update `Packages' Patches`
  • Loading branch information
khoih-prog committed Oct 19, 2022
1 parent 4c5e4f1 commit dbd4351
Show file tree
Hide file tree
Showing 22 changed files with 97 additions and 61 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* `ArduinoCore-mbed` Core Version (e.g. `ArduinoCore-mbed` mbed_portenta core v3.1.1)
* `ArduinoCore-mbed` Core Version (e.g. `ArduinoCore-mbed` mbed_portenta core v3.3.0)
* `Portenta_H7` Board type (e.g. Portenta_H7 Rev2 ABX00042, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
Expand All @@ -28,13 +28,13 @@ Please ensure to specify the following:

```
Arduino IDE version: 1.8.19
`ArduinoCore-mbed` mbed_portenta core v3.1.1
`ArduinoCore-mbed` mbed_portenta core v3.3.0
Portenta_H7 Rev2 ABX00042
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.15.0-50-generic #56~20.04.1-Ubuntu SMP Tue Sep 27 15:51:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered an endless loop while trying to connect to Local WiFi.
I encountered a crash when using this library
Steps to reproduce:
1. ...
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.3.1](#releases-v131)
* [Releases v1.3.0](#releases-v130)
* [Releases v1.2.0](#releases-v120)
* [Releases v1.1.0](#releases-v110)
Expand All @@ -21,6 +22,11 @@

## Changelog

### Releases v1.3.1

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`

### Releases v1.3.0

1. Fix long timeout if using `IPAddress`
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/AsyncCustomHeader/AsyncCustomHeader.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
//char GET_ServerAddress[] = "192.168.2.110/";
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/AsyncDweetGet/AsyncDweetGet.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char GET_ServerAddress[] = "dweet.io";
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/AsyncDweetPost/AsyncDweetPost.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char POST_ServerAddress[] = "dweet.io";
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/AsyncHTTPRequest/AsyncHTTPRequest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include <Portenta_H7_AsyncHTTPRequest.h> // https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest
Expand Down
4 changes: 2 additions & 2 deletions examples/Ethernet/AsyncSimpleGET/AsyncSimpleGET.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
//char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char GET_ServerAddress[] = "arduino.tips";
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFi/AsyncCustomHeader/AsyncCustomHeader.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
//char GET_ServerAddress[] = "192.168.2.110/";
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFi/AsyncDweetGet/AsyncDweetGet.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char GET_ServerAddress[] = "dweet.io";
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFi/AsyncDweetPost/AsyncDweetPost.ino
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char POST_ServerAddress[] = "dweet.io";
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFi/AsyncHTTPRequest/AsyncHTTPRequest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include <Portenta_H7_AsyncHTTPRequest.h> // https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest
Expand Down
4 changes: 2 additions & 2 deletions examples/WiFi/AsyncSimpleGET/AsyncSimpleGET.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
//char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include "defines.h"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

// Select a test server address
const char GET_ServerAddress[] = "arduino.tips";
Expand Down
4 changes: 2 additions & 2 deletions examples/multiFileProject/multiFileProject.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#error This code is intended to run on the Portenta_H7 platform! Please check your Tools->Board setting.
#endif

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN_TARGET "Portenta_H7_AsyncHTTPRequest v1.3.1"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MIN 1003001

#include "multiFileProject.h"

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Portenta_H7_AsyncHTTPRequest",
"version": "1.3.0",
"version": "1.3.1",
"keywords": "communication, http, async, websocket, webserver, async-webserver, async-tcp, async-udp, async-websocket, async-http, ssl, tls, mbed, mbed-portenta, portenta-h7, portentah7, portenta-h7-m7, portenta-h7-m4, portentah7-m7, portentah7-m4, stm32h7",
"description": "Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of Portenta_H7_AsyncTCP library for Portenta_7, using Vision-shield Ethernet or Murata WiFi.",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Portenta_H7_AsyncHTTPRequest
version=1.3.0
version=1.3.1
author=Hristo Gochkov,Khoi Hoang
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=Simple Async HTTP Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of Portenta_H7_AsyncTCP library for Portenta_7, using Vision-shield thernet or Murata WiFi.
Expand Down
6 changes: 4 additions & 2 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ upload_speed = 921600

; Checks for the compatibility with frameworks and dev/platforms
lib_compat_mode = strict
lib_ldf_mode = chain+
;lib_ldf_mode = deep+

lib_deps =
; PlatformIO 4.x

; Portenta_H7_AsyncTCP@>=1.3.2
; Portenta_H7_AsyncTCP@>=1.4.0
; PlatformIO 5.x
khoih-prog/Portenta_H7_AsyncTCP@>=1.3.2
khoih-prog/Portenta_H7_AsyncTCP@>=1.4.0


build_flags =
Expand Down
6 changes: 4 additions & 2 deletions src/Portenta_H7_AsyncHTTPRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/10/2020 Initial coding for Portenta_H7
1.1.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error
1.2.0 K Hoang 24/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h
1.3.0 K Hoang 02/09/2022 Fix bug. Improve debug messages. Optimize code
1.3.1 K Hoang 18/10/2022 Not try to reconnect to the same host:port after connected
*****************************************************************************************************************************/

#pragma once
Expand Down
12 changes: 7 additions & 5 deletions src/Portenta_H7_AsyncHTTPRequest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/10/2020 Initial coding for Portenta_H7
1.1.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error
1.2.0 K Hoang 24/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h
1.3.0 K Hoang 02/09/2022 Fix bug. Improve debug messages. Optimize code
1.3.1 K Hoang 18/10/2022 Not try to reconnect to the same host:port after connected
*****************************************************************************************************************************/

#pragma once
Expand Down Expand Up @@ -59,13 +61,13 @@
#define SHIELD_TYPE "Portenta_H7 WiFi"
#endif

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION "Portenta_H7_AsyncHTTPRequest v1.3.0"
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION "Portenta_H7_AsyncHTTPRequest v1.3.1"

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MAJOR 1
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_MINOR 3
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_PATCH 0
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_PATCH 1

#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_INT 1003000
#define PORTENTA_H7_ASYNC_HTTP_REQUEST_VERSION_INT 1003001

#include "Portenta_H7_AsyncTCP.h"

Expand Down
6 changes: 4 additions & 2 deletions src/Portenta_H7_AsyncHTTPRequest_Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/>.
Version: 1.3.0
Version: 1.3.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 13/10/2020 Initial coding for Portenta_H7
1.1.0 K Hoang 30/12/2021 Fix `multiple-definitions` linker error
1.2.0 K Hoang 24/01/2022 Enable compatibility with old code to include only AsyncHTTPRequest_Generic.h
1.3.0 K Hoang 02/09/2022 Fix bug. Improve debug messages. Optimize code
1.3.1 K Hoang 18/10/2022 Not try to reconnect to the same host:port after connected
*****************************************************************************************************************************/

#pragma once
Expand Down
Loading

0 comments on commit dbd4351

Please sign in to comment.