fix/body_close Close body only if connection successful

It leads to a panic if we try to close a non-open connection