Don't forget to restart the writer task when reconnecting