Giter Club home page Giter Club logo

Comments (5)

blub0hr avatar blub0hr commented on July 19, 2024

I just ran into the very same issue. It has nothing to do with your redirect.

Adding this line before closing the socket solved it for me.

$this->send(self::TYPE_DISCONNECT);  

I dunno if this is the right thing to do but no error is good i guess.

/**
 * Close the socket
 *
 * @return boolean
 */
public function close()
{
    if ($this->fd) {
        $this->send(self::TYPE_DISCONNECT);
        fclose($this->fd);
        return true;
    }
    return false;
}

from elephant.io.

guillaumepotier avatar guillaumepotier commented on July 19, 2024

Hi,

That seems a good move @blub0hr. I'll try to add your line today on my existing project. Please, can you do so @solitud ?

Best

from elephant.io.

solitud avatar solitud commented on July 19, 2024

Hey,
I added

$this->send(self::TYPE_DISCONNECT);

The error message now disappeared, thanks!
I get

info  - transport end by forced client disconnection

This is the desired effect, I think?
If I implement the change to the close function I get

   info  - transport end by forced client disconnection
   info  - transport end (booted)

I don't know if this is necessary. A little too much end of transport, so I reverted it for now.

BTW: the error occured only on my live system running PHP 5.3 and not on my MAMP Testserver with PHPH 5.4.

Anyway thanks a lot, solitud

from elephant.io.

ludovicbarreca avatar ludovicbarreca commented on July 19, 2024

Hello,

As you can see in the little documentation, it is recommended to use the close function each time you want to close your socket, to avoid this kind of bugs.
Close function was intended to close the socket using the disconnect signal but it looks like that I somehow forgot to put it.
@blub0hr you can make a pull request with your solution.

Thank you guys for helping us!

from elephant.io.

guillaumepotier avatar guillaumepotier commented on July 19, 2024

Merged in dev-master and tagged as v2.0.1

Thanks

from elephant.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.