BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: Mojoh on July 20, 2010, 07:27:08 pm

Title: socket_read error
Post by: Mojoh on July 20, 2010, 07:27:08 pm
Hello

My bebot is coming back with an error after being connected to server for a while.

Warning: socket_read(): unable to read form fsocket [10054]:  An existing connection was forcibly closed by the remote host. in C:\BEBot\Sources\AOChat.php on line 311
Read error: An existing connection was forcibly closed by the remote host.


Any help on this matter would be appriciated.

Here is the subroutine from AOChat
function read_data($len)
   {
      $data = "";
      $rlen = $len;
      while($rlen > 0)
      {
Line 311**if(($tmp = socket_read($this->socket, $rlen)) === false)
         {
            if(!is_resource($this->socket))
            {
               $this->disconnect();
               die("Read error: $last_error\n");
            }
            else
            {
               printf("Read error: %s\n", socket_strerror(socket_last_error($this->socket)));
               return "";
            }
         }
Title: Re: socket_read error
Post by: Khalem on July 21, 2010, 08:13:05 pm
The only cause I know of for this to happen is due to the character being logged in again.

However I'm not sure about if there are any other instances the AoC chatservers might disconnect you forcibly.
SimplePortal 2.3.7 © 2008-2025, SimplePortal