fix the recv thread handler bug