protected function _updateQueue($aErrorMessage = null)
	{
		$aStreamErrorMessage = $this->_readErrorMessage();
		if (!isset($aErrorMessage) && !isset($aStreamErrorMessage)) {
			return false;
		} else if (isset($aErrorMessage, $aStreamErrorMessage)) {
			if ($aStreamErrorMessage['identifier'] <= $aErrorMessage['identifier']) {
				$aErrorMessage = $aStreamErrorMessage;
				unset($aStreamErrorMessage);
			}
		} else if (!isset($aErrorMessage) && isset($aStreamErrorMessage)) {
			$aErrorMessage = $aStreamErrorMessage;
			unset($aStreamErrorMessage);
		}

		$this->_log('ERROR: Unable to send message ID ' .
			$aErrorMessage['identifier'] . ': ' .
			$aErrorMessage['statusMessage'] . ' (' . $aErrorMessage['statusCode'] . ').');

		$this->disconnect();

		foreach($this->_aMessageQueue as $k => &$aMessage) {
			if ($k < $aErrorMessage['identifier']) {
				unset($this->_aMessageQueue[$k]);
			} else if ($k == $aErrorMessage['identifier']) {
				$aMessage['ERRORS'][] = $aErrorMessage;
			} else {
				break;
			}
		}

		$this->connect();

		return true;
	}
protected function _updateQueue($aErrorMessage = null)
	{
		$aStreamErrorMessage = $this->_readErrorMessage();
		if (!isset($aErrorMessage) && !isset($aStreamErrorMessage)) {
			return false;
		} else if (isset($aErrorMessage, $aStreamErrorMessage)) {
			if ($aStreamErrorMessage['identifier'] <= $aErrorMessage['identifier']) {
				$aErrorMessage = $aStreamErrorMessage;
				unset($aStreamErrorMessage);
			}
		} else if (!isset($aErrorMessage) && isset($aStreamErrorMessage)) {
			$aErrorMessage = $aStreamErrorMessage;
			unset($aStreamErrorMessage);
		}

		$this->_log('ERROR: Unable to send message ID ' .
			$aErrorMessage['identifier'] . ': ' .
			$aErrorMessage['statusMessage'] . ' (' . $aErrorMessage['statusCode'] . ').');

		$this->disconnect();

		foreach($this->_aMessageQueue as $k => &$aMessage) {
			if ($k < $aErrorMessage['identifier']) {
				unset($this->_aMessageQueue[$k]);
			} else if ($k == $aErrorMessage['identifier']) {
				$aMessage['ERRORS'][] = $aErrorMessage;
			} else {
				break;
			}
		}

		$this->connect();

		return true;
	}
protected function _updateQueue ( $ aErrorMessage = null ) { $ aStreamErrorMessage = $ this -> _readErrorMessage ( ) ; if ( ! isset ( $ aErrorMessage ) && ! isset ( $ aStreamErrorMessage ) ) { return false ; } else if ( isset ( $ aErrorMessage , $ aStreamErrorMessage ) ) { if ( $ aStreamErrorMessage [ 'identifier' ] <= $ aErrorMessage [ 'identifier' ] ) { $ aErrorMessage = $ aStreamErrorMessage ; unset ( $ aStreamErrorMessage ) ; } } else if ( ! isset ( $ aErrorMessage ) && isset ( $ aStreamErrorMessage ) ) { $ aErrorMessage = $ aStreamErrorMessage ; unset ( $ aStreamErrorMessage ) ; } $ this -> _log ( 'ERROR: Unable to send message ID ' . $ aErrorMessage [ 'identifier' ] . ': ' . $ aErrorMessage [ 'statusMessage' ] . ' (' . $ aErrorMessage [ 'statusCode' ] . ').' ) ; $ this -> disconnect ( ) ; foreach ( $ this -> _aMessageQueue as $ k => & $ aMessage ) { if ( $ k < $ aErrorMessage [ 'identifier' ] ) { unset ( $ this -> _aMessageQueue [ $ k ] ) ; } else if ( $ k == $ aErrorMessage [ 'identifier' ] ) { $ aMessage [ 'ERRORS' ] [ ] = $ aErrorMessage ; } else { break ; } } $ this -> connect ( ) ; return true ; }
Checks for error message and deletes messages successfully sent from message queue.

@param  $aErrorMessage @type array @optional The error message. It will anyway
always be read from the main stream. The latest successful message
sent is the lowest between this error message and the message that
was read from the main stream.
@see _readErrorMessage()
@return @type boolean True if an error was received.
Checks for error message and deletes messages successfully sent from message queue .