Fix non-block connection issue.