Restore AutoRestartConfirmationDialog handler (fixes API port not being applied) - #378
Open
chapinmark wants to merge 1 commit into
Open
Conversation
Reverts the removal in f3b6767. The handler is not defunct: Gateway 10.45 still raises the auto-restart confirmation dialog, and with no handler to dismiss it the modal blocks the configuration dialog from committing, so the TWS API socket port is never applied. Gateway then keeps listening on its default 4001 while IBC's log reports the port as set to 4002, and every API client fails to connect. Confirmed by an A/B of two 3.24.1 builds differing only by this change: handler absent -> binds 4001; dialog Opened, never Closed handler present -> binds 4002; Opened -> "Click button: OK" -> Closed Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #377.
Reverts the removal of
AutoRestartConfirmationDialogin f3b6767. The handler is not defunct: Gateway 10.45 still raises the auto-restart confirmation dialog, and with nothing to dismiss it the modal blocks the "Trader Workstation Configuration" dialog from committing. The TWS API socket port is therefore never applied and Gateway keeps listening on its default 4001, while IBC's log reports the port as set to 4002.git grep "trading platform restart automatically"finds this handler in 3.23.0 and nothing in 3.24.1, so no replacement exists.Verification
Two 3.24.1 builds differing only by this change (the handler file plus its one line in
IbcTws.java), run against the same live account, Gateway 1045, same host and configuration:Opened, neverClosedOpened→Click button: OK(2 ms) →ClosedThe file is restored exactly as it stood at 3.23.0, and the registration goes back in its original position in
IbcTws.java, immediately beforeRestartConfirmationDialogHandler.Scope
This only bites when IBC actually changes the auto-restart time, i.e.
AutoRestartTimeis set and the TWS settings directory is not persistent — so it is invisible to most users and reproduces every start in a container with a fresh/root/Jts.Independent of #376, which touches
LoginManageronly; the two do not interact.