Skip to content

Restore AutoRestartConfirmationDialog handler (fixes API port not being applied) - #378

Open
chapinmark wants to merge 1 commit into
IbcAlpha:masterfrom
chapinmark:fix/restore-autorestart-confirmation-handler
Open

Restore AutoRestartConfirmationDialog handler (fixes API port not being applied)#378
chapinmark wants to merge 1 commit into
IbcAlpha:masterfrom
chapinmark:fix/restore-autorestart-confirmation-handler

Conversation

@chapinmark

Copy link
Copy Markdown

Fixes #377.

Reverts the removal of AutoRestartConfirmationDialog in 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:

handler API port dialog
absent 4001 Opened, never Closed
restored 4002 OpenedClick button: OK (2 ms) → Closed

The file is restored exactly as it stood at 3.23.0, and the registration goes back in its original position in IbcTws.java, immediately before RestartConfirmationDialogHandler.

Scope

This only bites when IBC actually changes the auto-restart time, i.e. AutoRestartTime is 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 LoginManager only; the two do not interact.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.24.1: API socket port not applied — AutoRestartConfirmation dialog is never dismissed

1 participant