vfs_lwip: check _pcb for null in write_ready

_pcb may be zero due to shutdown or error in Tcp_socket_dir
This commit is contained in:
Sebastian Sumpf 2024-07-25 09:42:51 +02:00 committed by Christian Helmuth
parent a441bdf59a
commit f552b26fb9

View File

@ -1447,7 +1447,7 @@ class Lwip::Tcp_socket_dir final :
switch (handle.kind) {
case Lwip_file_handle::DATA:
return tcp_sndbuf(_pcb);
return _pcb ? tcp_sndbuf(_pcb) : false;
case Lwip_file_handle::PEEK:
case Lwip_file_handle::ACCEPT: