optimize connector shutdown