Open MartinMuzatko opened 2 years ago
I'm having the exact same issue with a ws
scheme versus a wss
scheme. wss works fine for me, but the library seems to reject ws connections.
-Edit: So I think the problem for me was my broker being setup with authentication and access control settings, but not providing the authentication when connecting from react. I also had to set keepalive to a value > 0.
Here is an example of my configuration: `<Connector brokerUrl={'tcp://xx.xxx.xx.xx:xxxx'} options={{ keepalive: 120, }}
... `
i have the same reconnect happening every second with nextJS v12. is there a proper solution for this yet ?
Hello! I am using
In my setup, the
Connector
connects tows://test.mosquitto.org:8080
. I tried various other servers to verify this problem persists.Even without a
useSubscription
hook, the module attempts to connect every few milliseconds.Even though I get 101 switching protocols.
Interestingly, I also only get
Status: undefined
This is the code:
I added a codesandbox where I can also observe the problem: https://codesandbox.io/s/headless-water-8hfcv