handle upstream connection closing early