wifi: esp_at: notify receivers on async close
`esp_close_work` can be queued from the `on_cmd_closed`, which clears `ESP_SOCK_CONNECTED` and sets `ESP_SOCK_CLOSE_PENDING`, but does no further work. The receive callback should still be run with no data when the socket is closed through this mechanism. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
1efce43a00
commit
a2c0bd8dd1
1 changed files with 1 additions and 1 deletions
|
@ -517,7 +517,7 @@ void esp_close_work(struct k_work *work)
|
|||
}
|
||||
|
||||
/* Should we notify that the socket has been closed? */
|
||||
if (old_flags & ESP_SOCK_CONNECTED) {
|
||||
if (old_flags & ESP_SOCK_CLOSE_PENDING) {
|
||||
k_mutex_lock(&sock->lock, K_FOREVER);
|
||||
if (sock->recv_cb) {
|
||||
sock->recv_cb(sock->context, NULL, NULL, NULL, 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue