问题描述
我正在Ingress/Kubernetes/GoogleCloud上运行服务器发送事件(SSE)服务器,它的工作原理像一个超级按钮.我可以在Web上运行SSE客户端,它们可以完美连接,可以毫无问题地开始接收事件.
I'm running a Server-sent Event (SSE) server over Ingress/Kubernetes/GoogleCloud and it works like a charm. I can run SSE clients over the web and they connect perfectly, start receiving events with no problem.
但是有一个丑陋的错误,我无法使其正常运行,一段时间后,在Chrome浏览器上,我收到了 net :: ERR_NETWORK_CHANGED
错误.不管我运行多少次,我总是在几秒钟/分钟之后得到它.
But there's one ugly bug I can't get it work right, on Chrome browsers after some time I get net::ERR_NETWORK_CHANGED
error. No matter how many times I run it, I always get it after a few seconds/minutes.
如果我通过Firefox运行相同的客户端,则不会发生任何错误.如果我在终端上使用cURL运行它,则不会发生任何错误.
If I run the same client over Firefox, nothing wrongs happens. If I run it using cURL over terminal, nothing wrong happens.
如果我决定在不使用HTTPS的Chrome上运行,那就可以了!我只能在通过HTTPS和Chrome浏览器运行它时得到它.
If I decide to run if over Chrome without HTTPS, it works! I'm only getting it when running it through HTTPS and on a Chrome browser.
以前有人遇到过吗?对我来说似乎是个丑陋的虫子.
Has anyone encountered this before? Seems like a ugly bug for me.
推荐答案
我遇到了同样的问题,但这是偶发的.
I'm having the same problem but it's sporadic.
从Chromium项目源代码:当主机计算机的硬件或软件发生变化而影响网络数据包到达任何网络服务器的路由时,将调用OnNetworkChanged.一些例子:
From the Chromium project source code: OnNetworkChanged will be called when a change occurs to the host computer's hardware or software that affects the route network packets take to any network server. Some examples:
- 网络连接可用或不可用.例如插入或拔出以太网电缆,WiFi或蜂窝调制解调器与网络连接或断开连接,或者正在与VPN隧道连接建立或撤消.
-
活动网络连接的IP地址已更改.
- A network connection becoming available or going away. For example plugging or unplugging an Ethernet cable, WiFi or cellular modem connecting or disconnecting from a network, or a VPN tunnel being established or taken down.
An active network connection's IP address changes.
更改本地IP路由表.
希望有帮助
这篇关于net :: ERR_NETWORK_CHANGED在Chrome上的Https套接字连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!