bigskysoftware / bigskysoftware/htmx-extensions
websockets reconnect after element removed
- Dominant language
- JavaScript
- Stars
- 284
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
After an element with a `ws-connect` attribute is removed, the socket connection is closed but then immediately reconnects. If a long lived web page adds and removes many elements with `ws-connect`, every websocket that ever lived still keeps reconnecting.
This behavior seems to have been added by [this commit](https://github.com/bigskysoftware/htmx-extensions/commit/e87e1c3d0bf728b4e43861c7459f3f937883eb99).
Contributor guide
Research direction
Start by reviewing the commit linked in the issue and trace the reconnect behavior for elements with a ws-connect attribute. Reproduce removing such an element, then verify that its socket closes without reconnecting and that repeatedly adding and removing elements does not leave old connections active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100