refactor: 精简R8裸机工程并补强调试链路
This commit is contained in:
@@ -43,6 +43,13 @@ static err_t tcp_client_on_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p,
|
||||
}
|
||||
|
||||
if (p == NULL) {
|
||||
tcp_arg(pcb, NULL);
|
||||
tcp_recv(pcb, NULL);
|
||||
tcp_sent(pcb, NULL);
|
||||
tcp_err(pcb, NULL);
|
||||
if (tcp_close(pcb) != ERR_OK) {
|
||||
tcp_abort(pcb);
|
||||
}
|
||||
ctx->pcb = NULL;
|
||||
ctx->status.state = TCP_CLIENT_STATE_DISCONNECTED;
|
||||
ctx->next_retry_ms = HAL_GetTick() + ctx->config.reconnect_interval_ms;
|
||||
|
||||
Reference in New Issue
Block a user