Fixed "Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled." (see https://github.com/espressif/esp-idf/issues/1467)

This commit is contained in:
tantive
2019-01-03 20:40:57 +01:00
parent 6fab7724ab
commit 29661a6308

View File

@@ -281,7 +281,11 @@ typedef struct {
static err_t _tcp_output_api(struct tcpip_api_call_data *api_call_msg){
tcp_api_call_t * msg = (tcp_api_call_t *)api_call_msg;
msg->err = tcp_output(msg->pcb);
if(msg->pcb){
msg->err = tcp_output(msg->pcb);
} else {
msg->err = 0;
}
return msg->err;
}
@@ -1161,9 +1165,9 @@ void AsyncServer::end(){
tcp_arg(_pcb, NULL);
tcp_accept(_pcb, NULL);
if(_in_lwip_thread){
tcp_abort(_pcb);
tcp_close(_pcb);
} else {
_tcp_abort(_pcb);
_tcp_close(_pcb);
}
_pcb = NULL;
}