workaround a connreset bug in api