vert-x3/vertx-mqtt

Unused client options manipulation

Opened this issue · 0 comments

ctron commented

In the constructor of the MQTT client, it looks like some changes in the past have changed the originally intended behavior:

public MqttClientImpl(Vertx vertx, MqttClientOptions options) {
// copy given options
NetClientOptions netClientOptions = new NetClientOptions(options);
netClientOptions.setIdleTimeout(DEFAULT_IDLE_TIMEOUT);
this.vertx = (VertxInternal) vertx;
this.options = new MqttClientOptions(options);
this.keepAliveTimeout = ((options.getKeepAliveInterval() * 1000) * 3) / 2;
}

From what I see, the netClientOptions gets copied, manipulated, but then not used at all.