Thufayl opened a new pull request, #13512: URL: https://github.com/apache/seatunnel/pull/13512
### Purpose of this pull request Closes #13452. When open_messages are configured, WebSocketSourceClient.onOpen reset the reconnect counter before sending them. A rejected open-message send() then cancelled the socket and reconnected from a counter that had just been reset, so the source retried forever at attempt 1/max_reconnect_times. Separately, a send failure recorded by one attempt could surface as the terminal error of a later attempt that failed before onOpen. This resets the reconnect budget only after the handshake succeeds and all open messages are accepted, so a rejected open-message send counts toward max_reconnect_times; and it clears the recorded send failure when scheduling the next attempt, so the terminal error reflects the final attempt's cause. ### Does this PR introduce _any_ user-facing change? Yes, a behavior fix within the unreleased dev branch. Previously, with enable_reconnect = true and open_messages set, a connection whose open-message send was rejected on every attempt reconnected indefinitely instead of failing after max_reconnect_times. Now the task fails with a terminal error once the budget is exhausted, and the error names the open-message send failure; if the final attempt fails before the handshake completes, the error reports that failure instead. ### How was this patch tested? Added WebSocketSourceClientReconnectTest with two unit tests: repeated open-message send rejection now stops at max_reconnect_times with a terminal error, and a final attempt that fails before onOpen is reported as the terminal error. The full connector-websocket module test suite passes. ### Check list * [ ] No new Jar binary added. * [ ] No documentation change needed (no new/changed option). * [ ] No incompatible change. * [ ] Connector checklist (plugin-mapping / seatunnel-dist / label-scope-conf / e2e / plugin_config): N/A — bug fix to an existing connector, no new connector or option. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
