You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2018. It is now read-only.
I've run into a problem where once a host has been set (in the config object passed to the eiscp.connect function), it is impossible to unset this, meaning that you cannot revert to selecting the first found receiver on the network.
It looks like line 290 in eiscp.js is preventing this from ever being cleared:
config.host = options.host || config.host;
Meaning that line 303 which determines whether or not to pick the first found device always resolves as false:
if (typeof config.host === 'undefined' || config.host === '') {
While I can see it as useful for the other options to not be unset, to clear the host and revert back to discovering the first host would be useful.
As an example.
var eiscp = require('eiscp');
var connectionOptions = { port: 60128, reconnect: false, reconnect_sleep: 5, modelsets: [], send_delay: 500, verify_commands: false };
// connectionOptions.host is undefined
eiscp.connect(connectionOptions);
//Connects fine
eiscp.disconnect();
connectionOptions.host = '192.168.1.81';
eiscp.connect(connectionOptions);
//Connects fine
eiscp.disconnect();
connectionOptions.host = '';
eiscp.connect(connectionOptions);
//Attempts to connect to 192.168.1.81 regardless of other receivers.
eiscp.disconnect();
connectionOptions.host = undefined;
eiscp.connect(connectionOptions);
//Attempts to connect to 192.168.1.81 regardless of other receivers.
eiscp.disconnect();
The text was updated successfully, but these errors were encountered:
I need this change for a project I'm working on so I've forked and made the change for my own purposes, I'm not sure if this requirement is an issue or by design though.
Hi.
I've run into a problem where once a host has been set (in the config object passed to the eiscp.connect function), it is impossible to unset this, meaning that you cannot revert to selecting the first found receiver on the network.
It looks like line 290 in eiscp.js is preventing this from ever being cleared:
config.host = options.host || config.host;
Meaning that line 303 which determines whether or not to pick the first found device always resolves as false:
if (typeof config.host === 'undefined' || config.host === '') {
While I can see it as useful for the other options to not be unset, to clear the host and revert back to discovering the first host would be useful.
As an example.
The text was updated successfully, but these errors were encountered: