Rework tcp connections.

Use async connect and reconnect if connection closes.
Before this listener would exit on problems.