public function _bad($errstr, $isbad = true)
    {
        global $_web_access_retry_timeout;
        $this->console->writeln($this->_webaccess_str.'$f00'.$errstr);

        if ($this->_socket) {
            @fclose($this->_socket);
        }

        $this->_socket = null;

        if ($isbad) {
            if (isset($this->_spool[0]['State'])) {
                $this->_spool[0]['State'] = 'BAD';
            }
            $this->_state = 'BAD';

            $this->_bad_time = time();
            if ($this->_bad_timeout < $_web_access_retry_timeout) {
                $this->_bad_timeout = $_web_access_retry_timeout;
            } else {
                $this->_bad_timeout *= 2;
            }
        } else {
            if (isset($this->_spool[0]['State'])) {
                $this->_spool[0]['State'] = 'OPEN';
            }
            $this->_state = 'CLOSED';
        }
        $this->_callCallback($this->_webaccess_str.$errstr);
    }
public function _bad($errstr, $isbad = true)
    {
        global $_web_access_retry_timeout;
        $this->console->writeln($this->_webaccess_str.'$f00'.$errstr);

        if ($this->_socket) {
            @fclose($this->_socket);
        }

        $this->_socket = null;

        if ($isbad) {
            if (isset($this->_spool[0]['State'])) {
                $this->_spool[0]['State'] = 'BAD';
            }
            $this->_state = 'BAD';

            $this->_bad_time = time();
            if ($this->_bad_timeout < $_web_access_retry_timeout) {
                $this->_bad_timeout = $_web_access_retry_timeout;
            } else {
                $this->_bad_timeout *= 2;
            }
        } else {
            if (isset($this->_spool[0]['State'])) {
                $this->_spool[0]['State'] = 'OPEN';
            }
            $this->_state = 'CLOSED';
        }
        $this->_callCallback($this->_webaccess_str.$errstr);
    }
public function _bad ( $ errstr , $ isbad = true ) { global $ _web_access_retry_timeout ; $ this -> console -> writeln ( $ this -> _webaccess_str . '$f00' . $ errstr ) ; if ( $ this -> _socket ) { @ fclose ( $ this -> _socket ) ; } $ this -> _socket = null ; if ( $ isbad ) { if ( isset ( $ this -> _spool [ 0 ] [ 'State' ] ) ) { $ this -> _spool [ 0 ] [ 'State' ] = 'BAD' ; } $ this -> _state = 'BAD' ; $ this -> _bad_time = time ( ) ; if ( $ this -> _bad_timeout < $ _web_access_retry_timeout ) { $ this -> _bad_timeout = $ _web_access_retry_timeout ; } else { $ this -> _bad_timeout *= 2 ; } } else { if ( isset ( $ this -> _spool [ 0 ] [ 'State' ] ) ) { $ this -> _spool [ 0 ] [ 'State' ] = 'OPEN' ; } $ this -> _state = 'CLOSED' ; } $ this -> _callCallback ( $ this -> _webaccess_str . $ errstr ) ; }
put connection in BAD state
put connection in BAD state