add withSocketsDo and stop printing out messages when thread exits