Check the status of the Context in blockConnected so it can be canceled when a shutdown is requested.