fix connection leaks in the testing code. Prevents my machine from running out of sockets during soak tests