Skip to content
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.

请问如何在 on disconnect 后调用重连机制 #22

Open
TimonPeng opened this issue Dec 9, 2017 · 0 comments
Open

请问如何在 on disconnect 后调用重连机制 #22

TimonPeng opened this issue Dec 9, 2017 · 0 comments

Comments

@TimonPeng
Copy link

TimonPeng commented Dec 9, 2017

socket.on('disconnect', function () {
  console.log('disconnect')
  socket.io.reconnect();
});

只会尝试重连一次,不会循环尝试。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant