E
E
exetico2020-12-21 04:44:09
Socket.io
exetico, 2020-12-21 04:44:09

Why is there an endless reconnection of sockets on the client?

it does not refresh the page.
server:

io.sockets.on('connection', function(socket) {
  console.log('Подключились' + ' id: ' + socket.id)
  socket.on('disconnect', async function(data) {
    console.log('Отключились')
  })
})


customer:
import io from 'socket.io-client'
const socket = io()

5fdffde3c8b29723545232.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
exetico, 2020-12-21
@exetico

the issue is resolved, the problem was in the old version of socket io on the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question