Store discovered SK server address & port
When the SignalK server is auto-discovered through mDNS, the address and port are now saved into the WSClient instace so they can be later retrieved via the get_configuration method. Before this they were never stored, so calling the get_configuration function always returned an empty Json object
@@ -392,6 +392,9 @@ void WSClient::connect() {
} else {
debugI("Signal K server has been found at address %s:%d by mDNS.",
server_address.c_str(), server_port);
+ // Store the discovered server details so they can be retrieved later on
+ this->server_address_ = server_address;
+ this->server_port_ = server_port;
}
}
