close pending connections on shutdown