Stop socket.io from reconnecting

后端 未结 6 747
情歌与酒
情歌与酒 2020-12-31 05:58

Simple scenario:

  1. Client connects to server with socket.io (socket = io.connect(...))
  2. Server crashes
  3. Client tries to reconnect
6条回答
  •  情歌与酒
    2020-12-31 06:51

    This one works great for me, though , it shoots one more attempt before stops completely.

    socket.io-client": "2.2.0"

    this.socket.io.reconnectionAttempts(0);

提交回复
热议问题