hmm... if i understand your problem correctly, the way to solve it might perhaps be found in a shared connection. or, better still: leave the connection to the main thread and let all child threads put their "requests" on a thread queue this main thread reads from. however, that's just a quick thought...