fix deadlock in httpclient