Fix too much open fds, and remove sleep function.

Signed-off-by: Yunchao Chen <ytu_cyc@126.com>