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

polling方式一直连不上,尝试很多次后能成功! #692

Open
KevinGitHub1 opened this issue Jul 16, 2019 · 3 comments
Open

polling方式一直连不上,尝试很多次后能成功! #692

KevinGitHub1 opened this issue Jul 16, 2019 · 3 comments

Comments

@KevinGitHub1
Copy link

服务端报错:
ERROR 6968 --- [tLoopGroup-3-56] c.c.socketio.transport.PollingTransport : 848d39bf-73ef-4415-8047-3d64f14bce03 is not registered. Closing connection
客户端报错: http://ip:9099/socket.io/?loginUser=5555&EIO=3&transport=polling&t=MlvmOQ5&sid=848d39bf-73ef-4415-8047-3d64f14bce03 net::ERR_CONNECTION_RESET
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.onData @ socket.io.js:7
(anonymous) @ socket.io.js:7
r.emit @ socket.io.js:6
i.onData @ socket.io.js:7
i.onLoad @ socket.io.js:7
hasXDR.e.onreadystatechange @ socket.io.js:7
XMLHttpRequest.send (async)
i.create @ socket.io.js:7
i @ socket.io.js:7
o.request @ socket.io.js:7
o.doPoll @ socket.io.js:7
r.poll @ socket.io.js:7
r.doOpen @ socket.io.js:7
r.open @ socket.io.js:7
r.open @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r.open.r.connect @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6
r @ socket.io.js:6

Error: xhr poll error
at o.r.onError (socket.io.js:7)
at i. (socket.io.js:7)
at i.r.emit (socket.io.js:6)
at i.onError (socket.io.js:7)
at socket.io.js:7
transport error

@godtrack
Copy link

Polling很不友好,建议你用Websocket。
io('server-address', { transports: [ 'websocket' ] })

@xupengggggg
Copy link

Polling在ie9及以下很ok,,,在ie9以上很难连得不上,目前只能判断ie版本来决定要不要Websocket

@kevinhuangwl
Copy link

遇到类似问题,也是要多次重连。设了websocket,立马解决

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

No branches or pull requests

4 participants