-
Couldn't load subscription status.
- Fork 18
Description
If you send a successful HTTP request to a server before receiving data from the sender, in the setup function for instance, it will work fine and you'll get a 200 code.
However, if you add a line in the onReceive() function of the receiver that sends the same HTTP request using your WiFi network (whenever you receive data from the esp32 sender using the same WiFi channel), it will always give you a -1 error code.
Here is an example where the first POST request is sent in setup(), and the two other POST requests are sent in onReceive() function, after receiving data two times :
Sender (does not appear on the image)
Receiver: 192.168.188.120
Server: 192.168.188.230
As you can see, the first POST request works fine (frames 105 to 120). Meanwhile, in the two last POST requests the receiver sends [RST, ACK] and does not proceed with sending payload, regardless of how the server is coded. Here is the code I used for receiver and sender:
You can reproduce this issue using the following files:
The code tries to send a GET request to api.github.com before receiving data and every time it receives data in the callback function. Here is the result:
Note: I had to comment this line peerInfo.ifidx = ESP_IF_WIFI_STA; because it would not compile using Arduino.

