You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe Your Goal
Consider the websocket chat example.
When a client connects I want/need to send an initial update/json to populate the browser with the current parameters/settings.
However, when I add any 'send' calls in the 'create' method the device restarts with : Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
What Does Your Project Look Like
Adding just a single line to the chat example causes the issue:
WebsocketHandler * ChatHandler::create() {
Serial.println("Creating new chat client!");
ChatHandler * handler = new ChatHandler();
for(int i = 0; i < MAX_CLIENTS; i++) {
if (activeClients[i] == nullptr) {
activeClients[i] = handler;
break;
}
}
FYI A workaround was to have the client, immediately after establishing a connection to the host, request an update.
And in the message handler function on the server send the current parameters back to the client.
This is not as direct as having the server push the data, but it is adequate.
Describe Your Goal
Consider the websocket chat example.
When a client connects I want/need to send an initial update/json to populate the browser with the current parameters/settings.
However, when I add any 'send' calls in the 'create' method the device restarts with :
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
What Does Your Project Look Like
Adding just a single line to the chat example causes the issue:
ESP32 Module
WT32-ETH01
Software (please complete the following information if applicable)
Additional context
What is the correct way to send to a client just after its creation?
The text was updated successfully, but these errors were encountered: