Commit 89df4a2
Support
Addresses #15001
The Web MQTT handler only accepts the `mqtt` WebSocket subprotocol,
rejecting clients that request `mqttv3.1`. This prevents some MQTT
clients from establishing WebSocket connections.
This change updates the protocol negotiation to accept either `mqtt` or
`mqttv3.1` subprotocols. The handler uses `lists:search/2` to find the
first matching protocol and echoes that exact value back in the
`sec-websocket-protocol` response header, ensuring proper protocol
negotiation with the client.
(cherry picked from commit 12a6645)mqttv3.1 WebSocket subprotocol in addition to mqtt
1 parent 980a6ce commit 89df4a2
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments