$controlSocket is declared globally uptop, and then is configured in the sub commandPath to initiate the socket to the master server. Even though I declared it globally, I can't access it from outside the thread. Unless you're seeing something else and I'm misinterpreting what you're saying?