Skip to content

Commit

Permalink
Add forgotten WebSocketSecureNetworkModule changes
Browse files Browse the repository at this point in the history
Signed-off-by: James Tomson <[email protected]>
  • Loading branch information
jtomson committed May 27, 2022
1 parent f6681ea commit e1a8b5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Properties;
import javax.net.ssl.SSLSocketFactory;

import org.eclipse.paho.client.mqttv3.IMqttDns;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule;
import org.eclipse.paho.client.mqttv3.logging.Logger;
Expand All @@ -49,8 +50,8 @@ public class WebSocketSecureNetworkModule extends SSLNetworkModule{
*/
private ByteArrayOutputStream outputStream = new ExtendedByteArrayOutputStream(this);

public WebSocketSecureNetworkModule(SSLSocketFactory factory, String uri, String host, int port, String clientId, Properties customWebSocketHeaders) {
super(factory, host, port, clientId);
public WebSocketSecureNetworkModule(SSLSocketFactory factory, String uri, String host, int port, String clientId, IMqttDns dns, Properties customWebSocketHeaders) {
super(factory, host, port, clientId, dns);
this.uri = uri;
this.host = host;
this.port = port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public NetworkModule createNetworkModule(URI brokerUri, MqttConnectOptions optio

// Create the network module...
WebSocketSecureNetworkModule netModule = new WebSocketSecureNetworkModule((SSLSocketFactory) factory,
brokerUri.toString(), host, port, clientId, options.getCustomWebSocketHeaders());
brokerUri.toString(), host, port, clientId, options.getDns(), options.getCustomWebSocketHeaders());
netModule.setSSLhandshakeTimeout(options.getConnectionTimeout());
netModule.setSSLHostnameVerifier(options.getSSLHostnameVerifier());
netModule.setHttpsHostnameVerificationEnabled(options.isHttpsHostnameVerificationEnabled());
Expand Down

0 comments on commit e1a8b5c

Please sign in to comment.