callback for ConnectThread