socket monitor thread: don't double close socket, or read from closed socket