Added graceful connection shutdowns.