for bug #235, pass timeout to recv thread.
for bug #235, refine the queue recv thread.