move close into non error block and defer it

I found that if the a host was not in dns then the req close was causing a panic.