Removed unnecessary socket closure on reset.