fixed deadlock of socket descriptors round 2