It looks like you're new here. If you want to get involved, click one of these buttons!
if (
(current_reconnection_count > reconnect_max_tries)
|| !should_reconnect
) {
trigger('noreconnect');
process.exit(1);
}
Suggested fix:
if (!should_reconnect) {
// Manual disconnect requested.
// Do not reconnect.
// Do not terminate process.
trigger('noreconnect');
return;
}
if (current_reconnection_count > reconnect_max_tries) {
trigger('noreconnect');
return;
}
This problem can unexpectedly terminate long-running trading systems that dynamically create and destroy tickers/contracts during live trading.