在前端用websocket连接时提示说502 Bad GateWay,过了一会又自己连上了,这样体验很差啊。。。请问是什么原因呢?另外,前台关闭页面时,后台服务器没有即使获取disconnect事件。。。以上两个问题在本地测试时完全没问题。。后台用的是nodejs,(socket模块:socket.io)求教是怎么回事?!和解决办法~~
It should be a background program error...
I encountered a problem before. The background fetched data from the database. Because some fields had HTML and entities, and some did not, it caused a network request to the server 502. Later, I was able to basically conclude that 502 was a program problem...
Search nginx websocket or nginx socket.io yourself
Don’t step on it
It should be a background program error...
I encountered a problem before. The background fetched data from the database. Because some fields had HTML and entities, and some did not, it caused a network request to the server 502. Later, I was able to basically conclude that 502 was a program problem...