This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Callback behaviour is buggy (ESP8266) #43
Closed
Description
I'm on the latest version of the library.
My scenario: every 10 seconds I want to make a POST call to a server containing a JSON body.
The full testing code is available here: https://gist.github.com/dirkvranckaert/93ca29597a9f6732465d23cb9e2b62b3
Here is the log of what I observe:
11:41:06.936 -> ****************************************
11:41:07.010 -> ****************************************
11:41:07.010 -> ****************************************
11:41:07.087 ->
11:41:07.087 ->
11:41:07.087 -> Sending new request...
11:41:07.087 -> Network result...
11:41:07.125 -> NOT_CONNECTED
11:41:07.125 -> -4
11:41:07.125 -> Network result callback done!
11:41:07.162 -> Network result...
11:41:07.200 -> HTTP OK
11:41:07.200 -> 200
11:41:07.200 -> Network result callback done!
11:41:17.048 ->
11:41:17.048 ->
11:41:17.048 -> ****************************************
11:41:17.085 -> ****************************************
11:41:17.119 -> ****************************************
11:41:17.194 ->
11:41:17.194 ->
11:41:17.194 -> Sending new request...
11:41:17.339 -> Network result...
11:41:17.339 -> Bad Request
11:41:17.378 -> 400
11:41:17.378 -> Network result callback done!
11:41:27.091 ->
So my observation is:
- The first network call is executed and reports twice in the callback, first with
HTTPCODE_NOT_CONNECTED
followed by the regular network response. That seems bizar to me that I first get the not connected followed by a proper response... I'm not sure if that's ok and if I can safely ignore the not connected... - Then we fire the second network call (same call just 10 minutes after), that call is started with success, however it immediately reports back with an HTTP error code 400 (I check my server and the request never arrived so it's definitely a client thing).
This sequence keeps repeating itself exactly like this, calls 3, 5, 7,... are like call 1. The followup calls 4, 6,, 8,... are always like call 2!
In my opinion both are an issue.
Can you please have a look?
Metadata
Metadata
Assignees
Labels
No labels