DrDread746 opened a new pull request, #7727:
URL: https://github.com/apache/shenyu/pull/7727

   ### Description
   Fixes #7693
   
   During HTTP long-polling sync (`HttpLongPollingDataChangedListener`), held 
requests (>20s) without configuration updates caused `InstanceCheckService` to 
falsely classify active gateway instances as `OFFLINE`.
   
   ### Key Changes
   1. **Periodic Liveness Refresh:** `HttpLongPollingDataChangedListener` now 
schedules a periodic heartbeat refresh (every 10 seconds) on its managed 
`ScheduledExecutorService` while long-polling requests are held.
   2. **Clean Lifecycle & Disconnect Handling:** Added 
`jakarta.servlet.AsyncListener` to `LongPollingClient` to execute immediate 
resource cleanup (`cleanUp()`) and cancel scheduled tasks on completion, 
timeout, or disconnects.
   3. **Safety Constraints:** Retained original `SERVER_MAX_HOLD_TIMEOUT`, 
avoided unmanaged thread loops, and filtered client ports set to `"0"`.
   
   ### Test Coverage
   - Added test cases in `HttpLongPollingDataChangedListenerTest` verifying 
false offline reproduction, periodic liveness refreshes during holds, clean 
cleanup on completion/disconnect, and port zero filtering.
   - Verified all 53 unit tests pass and Checkstyle reports 0 violations.


-- 
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]

Reply via email to