Disposing connection when ShutdownSignalException occurs