Don't croak if the lwIP TCP queue gets too long
commit2e5416f43f4f81d5af24f0220112cf9e11d2e72a
authorKevin Cernekee <cernekee@gmail.com>
Mon, 19 Nov 2012 19:54:20 +0000 (19 11:54 -0800)
committerKevin Cernekee <cernekee@gmail.com>
Mon, 26 Nov 2012 00:19:47 +0000 (25 16:19 -0800)
tree9f662978d5736e4339583a6097dc660bb45b27fe
parent7040e3447e0dffa5e615470043313527602fde84
Don't croak if the lwIP TCP queue gets too long

On a slow connection with many pending local->VPN transmissions,
tcp_sndbuf() may indicate that it is safe to write data even though the
queue length is too long.  In this case tcp_write() will return ERR_MEM,
and ocproxy will die.

Add a (somewhat hacky) check for this to local_data_cb().

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
contrib/ports/unix/proj/ocproxy/ocproxy.c