bug #49684, api_msg: treat non-blocking ERR_MEM as ERR_WOULDBLOCK

This corrects a case in lwip_netconn_do_writemore() where if a
non-blocking socket receives ERR_MEM in a call to tcp_write(), it would
return ERR_MEM, which would result in ENOMEM coming out of the socket
layer

This case can be gracefully handled by returning ERR_WOULDBLOCK since the
socket is already marked as no longer writable and sent_tcp/poll_tcp will
mark the socket as writable again based on available buffer space

This is very similiar to how ERR_MEM is resolved for blocking sockets
1 file changed