Skip to content

Commit

Permalink
WIFI Failure
Browse files Browse the repository at this point in the history
The firmware halts when it loses the wifi connection.
  • Loading branch information
SatsForFreedom authored and johnny9 committed Sep 5, 2023
1 parent 7f21f5c commit 032fe24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/stratum/stratum_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void realloc_json_buffer(size_t len)
if (new_sockbuf == NULL)
{
fprintf(stderr, "Error: realloc failed in recalloc_sock()\n");
exit(EXIT_FAILURE);
esp_restart();
}

json_rpc_buffer = new_sockbuf;
Expand Down Expand Up @@ -87,7 +87,7 @@ char *STRATUM_V1_receive_jsonrpc_line(int sockfd)
if (nbytes == -1)
{
perror("recv");
exit(EXIT_FAILURE);
esp_restart();
}

realloc_json_buffer(nbytes);
Expand Down Expand Up @@ -347,4 +347,4 @@ void STRATUM_V1_configure_version_rolling(int socket)
static void debug_stratum_tx(const char *msg)
{
ESP_LOGI(TAG, "tx: %s", msg);
}
}

0 comments on commit 032fe24

Please sign in to comment.