fix bug in check socket status for connecting