Prevent any actions when there is no connection.