diff --git a/lib/src/connectionhandling/server/mqtt_client_mqtt_server_ws_connection.dart b/lib/src/connectionhandling/server/mqtt_client_mqtt_server_ws_connection.dart index c983764..6d7d8b5 100644 --- a/lib/src/connectionhandling/server/mqtt_client_mqtt_server_ws_connection.dart +++ b/lib/src/connectionhandling/server/mqtt_client_mqtt_server_ws_connection.dart @@ -105,7 +105,8 @@ class MqttServerWsConnection extends MqttServerConnection { try { // Connect and save the socket. WebSocket.connect(uriString, - protocols: protocols.isNotEmpty ? protocols : null) + protocols: protocols.isNotEmpty ? protocols : null, + headers: headers) .then((socket) { client = socket; _startListening();