Sending push notifications via api.pushjet.io using WiFiClientSecure HTTPS POST works fine too.
But not at the same time. It reboots when I connect. I guess it has something to do with limited memory in the ESP, although I think 39kB is quite a lot.
It works simultaneously if I change connection to MQTT-server via WiFiClient.
Q1: Is it possible to have two secure connections at the same time?
Q2: Can it be solved by closing the MQTT-connection while sending the PUSH?
Q3: Can it be some bug that cause the ESP to reboot? I would very much prefer to have an error message.
Also, I update this remote unit via OTA. I have not found an easy way to redirect Serial.print to actually see what goes wrong. I can send debug via via MQTT, but the reboot happens so quickly that the debug is not transmitted.
Sketch uses 337937 bytes (40%) of program storage space. Maximum is 827376 bytes.
Global variables use 42228 bytes (51%) of dynamic memory, leaving 39692 bytes for local variables. Maximum is 81920 bytes.