API-1683 added connection reset fixed suggested by joshcom