connect and disconnect in other thread, fix a bug of status