If the master fails when a session command is being executed with delayed_retry enabled, a null query would get placed into the query queue. This change simply prevents the crash and closes the session even though the query could be retried.