Further improvements for connection recovery

This commit is contained in:
Djuri 2024-04-16 15:17:34 +02:00
parent 2ef56c1938
commit ad0800c233
11 changed files with 51 additions and 7561 deletions

View file

@ -248,13 +248,28 @@ void stopBlockNotify()
if (blockNotifyClient == NULL)
return;
esp_websocket_client_close(blockNotifyClient, portMAX_DELAY);
esp_websocket_client_close(blockNotifyClient, pdMS_TO_TICKS(5000));
esp_websocket_client_stop(blockNotifyClient);
esp_websocket_client_destroy(blockNotifyClient);
blockNotifyClient = NULL;
}
void restartBlockNotify()
{
stopBlockNotify();
if (blockNotifyClient == NULL) {
setupBlockNotify();
return;
}
// esp_websocket_client_close(blockNotifyClient, pdMS_TO_TICKS(5000));
// esp_websocket_client_stop(blockNotifyClient);
// esp_websocket_client_start(blockNotifyClient);
}
int getBlockFetch()
{
String mempoolInstance =