Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event:'ping' not firing on Manager on 4.1.2 #1475

Closed
tonymccallie opened this issue Jun 14, 2021 · 3 comments
Closed

Event:'ping' not firing on Manager on 4.1.2 #1475

tonymccallie opened this issue Jun 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@tonymccallie
Copy link

We are needing to programmatically catch the 'ping' event. The documentation indicates this is possible here:
https://socket.io/docs/v4/client-api/#Event-%E2%80%98ping%E2%80%99
But we are unable to do this. All other Manager events are working fine.

Socket.IO client version: 4.1.2

Client

    this.socket.io.on('{error|reconnect|etc}', (error) => {
      //all work great
    });

    this.socket.io.on('ping', () => {
      console.warn('ping');
      //never fires on 4.1.2
    });

I couldn't find any know issues with this. Is it a known bug?

@tonymccallie tonymccallie added the bug Something isn't working label Jun 14, 2021
@darrachequesne
Copy link
Member

I could indeed reproduce the issue, we'll publish a fix as soon as possible.

@tonymccallie
Copy link
Author

Thanks!

darrachequesne added a commit to socketio/engine.io-client that referenced this issue Jun 22, 2021
The "ping" event was forgotten when reversing the ping-pong mechanism
in [1]. It will now be properly emitted when receiving a ping from the
server.

[1]: 81d7171

Related: socketio/socket.io-client#1475
@darrachequesne
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants