Close the connection when the worker is done instead after looping a fixed number of times