cec: close and delete the connection when the processor thread ends. fixes reconnect...