Stop socket.io from reconnecting

后端 未结 6 790
情歌与酒
情歌与酒 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:35

    In a new socket.io 1.1.x you can do the following:

    var manager = io.Manager('http://localhost:9823', { autoConnect: false });
    

    Here is blog link.

提交回复
热议问题