connection open and closed in the service