fixed deadlock of socket descriptors round 3