Fixed concurrency problem on read from socket in multi-threads clients