forked from btclock/btclock_v3
Further improvements for connection recovery
This commit is contained in:
parent
2ef56c1938
commit
ad0800c233
11 changed files with 51 additions and 7561 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue