File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ static inline lwip_tcp_event_packet_t *_get_async_event() {
253253 }
254254}
255255
256- static void _remove_events_for_client (AsyncClient *client) {
256+ static size_t _remove_events_for_client (AsyncClient *client) {
257257 lwip_tcp_event_packet_t *removed_event_chain;
258258 {
259259 queue_mutex_guard guard;
@@ -269,6 +269,7 @@ static void _remove_events_for_client(AsyncClient *client) {
269269 removed_event_chain = t->next ;
270270 _free_event (t);
271271 }
272+ return count;
272273};
273274
274275void AsyncTCP_detail::handle_async_event (lwip_tcp_event_packet_t *e) {
@@ -637,7 +638,9 @@ static err_t _tcp_close_api(struct tcpip_api_call_data *api_call_msg) {
637638 *msg->pcb = nullptr ; // PCB is now the property of LwIP
638639 } else {
639640 // Ensure there is not an error event queued for this client
640- _remove_events_for_client (msg->close );
641+ if (_remove_events_for_client (msg->close )) {
642+ msg->err = ERR_OK ; // dispose needs to be run
643+ }
641644 }
642645 return msg->err ;
643646}
You can’t perform that action at this time.
0 commit comments