tell socat to stop on connection refuse with fork enabled
I'm using this instruction to forward a port to another, both on a local machine:
socat -d -d TCP4-LISTEN:80,reuseaddr,fork TCP4:127.0.0.1:8000
I need to keep the port open unless the destination port get closed (connection refuse).
Is it possible to ask `socat` to terminate on connection refuse (with fork enabled)?