Skip to content

Commit 619bfbd

Browse files
Update components/stratum/stratum_api.c
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 8ec1f3a commit 619bfbd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/stratum/stratum_api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,15 @@ char * STRATUM_V1_receive_jsonrpc_line(esp_transport_handle_t transport)
173173
timeout_count++;
174174
if (timeout_count >= 10) {
175175
ESP_LOGW(TAG, "Transport read timed out %d times, giving up", timeout_count);
176+
free(json_rpc_buffer);
177+
json_rpc_buffer = NULL;
178+
json_rpc_buffer_size = 0;
176179
return NULL;
177180
}
178181
continue;
182+
}
183+
}
184+
continue;
179185
}
180186
timeout_count = 0;
181187
realloc_json_buffer(nbytes);

0 commit comments

Comments
 (0)