Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Fix call to tcp_recved after pcb has been closed (#75)
Browse files Browse the repository at this point in the history
I got exception 28 with this decode
```

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
Decoding 27 results
0x4022b043: tcp_recved at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp.c line 1690
0x40202757: uart_write_char at C:\Users\doanh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/uart.c line 464
0x40247e81: scan_parse_beacon at ?? line ?
0x402120b0: AsyncMqttClient::_sendDisconnect() at D:\Documents\Arduino\libraries\async-mqtt-client-master\src/AsyncMqttClient.cpp line 96
0x4021213d: AsyncMqttClient::disconnect(bool) at D:\Documents\Arduino\libraries\async-mqtt-client-master\src/AsyncMqttClient.cpp line 96
0x4010502c: ets_timer_arm_new at ?? line ?
0x4021353d: AsyncMqttClient::_onPoll(AsyncClient*) at D:\Documents\Arduino\libraries\async-mqtt-client-master\src/AsyncMqttClient.cpp line 96
0x40213574: _M_invoke at D:\Documents\Arduino\libraries\async-mqtt-client-master\src/AsyncMqttClient.cpp line 96
0x4021444e: std::function ::operator()(void*, AsyncClient*) const at D:\Documents\Arduino\libraries\ESPAsyncTCP-master\src/ESPAsyncTCP.cpp line 659
0x402149b0: AsyncClient::_poll(tcp_pcb*) at D:\Documents\Arduino\libraries\ESPAsyncTCP-master\src/ESPAsyncTCP.cpp line 659
0x402149c4: AsyncClient::_s_poll(void*, tcp_pcb*) at D:\Documents\Arduino\libraries\ESPAsyncTCP-master\src/ESPAsyncTCP.cpp line 659
0x4022b3c8: tcp_slowtmr at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp.c line 1690
0x4022b768: tcp_fasttmr at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp.c line 1690
0x4022bcb4: tcpip_tcp_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 126
0x4022bcb4: tcpip_tcp_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 126
0x4022b7ac: tcp_tmr at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp.c line 1690
0x4022bd38: cyclic_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 165
0x4022bcbc: tcpip_tcp_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 132
0x40104d9e: wdt_feed at ?? line ?
0x4022be04: sys_check_timeouts at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/timeouts.c line 351
0x4025f100: ets_timer_handler_isr at ?? line ?
0x4025f10d: ets_timer_handler_isr at ?? line ?
0x4025f152: ets_timer_handler_isr at ?? line ?
0x4021d267: loop_task at C:\Users\doanh\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/core_esp8266_main.cpp line 132
```

so this fix can resolve this error
  • Loading branch information
Doanh Văn Lương authored and me-no-dev committed Jul 24, 2018
1 parent 649dd36 commit 0450e61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ESPAsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ int8_t AsyncClient::abort(){
}

void AsyncClient::close(bool now){
tcp_recved(_pcb, _rx_ack_len);
if(_pcb)
tcp_recved(_pcb, _rx_ack_len);
if(now)
_close();
else
Expand Down

0 comments on commit 0450e61

Please sign in to comment.