diff --git a/src/main/java/io/nats/client/Options.java b/src/main/java/io/nats/client/Options.java index 9f9b81510..c3b59d6bc 100644 --- a/src/main/java/io/nats/client/Options.java +++ b/src/main/java/io/nats/client/Options.java @@ -1806,6 +1806,9 @@ public String getDataPortType() { * @return the data port described by these options */ public DataPort buildDataPort() { + if (dataPortType.equals(DEFAULT_DATA_PORT_TYPE)) { + return new SocketDataPort(); + } return (DataPort) Options.createInstanceOf(dataPortType); }