POP3 direct-reply interceptor leaves active connection open when stopped

Aperta
#43,395 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Shreyas2004wagh ci sta già lavorando.

Dal 1/11/2026.

  • #43396 di @Shreyas2004wagh — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript

Direzione di ricerca

Start with POP3Helper.stop() and the direct-reply configuration closure that holds the helper, then the @rocket.chat/poplib client it wraps. Check the mocked-client regression test described in the issue, which asserts zero socket-close calls. Pull request #43396 already targets this fix, so review it before writing anything. Done means stop() clears the interval, closes the socket, removes listeners, and drops the reference.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: bug
Description:

When direct replies use POP3, changing or disabling a Direct_Reply_* setting calls POP3Helper.stop(). That method clears the polling interval but does not close the currently active POP3 connection or detach its listeners.

The stopped helper remains referenced by the direct-reply configuration closure until it is replaced. A settings change can therefore leave the previous POP3 socket/listener graph alive while a new interceptor is created. The old connection may also continue processing after direct reply has been disabled.

Steps to reproduce:
  1. Configure direct replies to use POP3.
  2. Start the interceptor while a POP3 connection is active.
  3. Disable direct replies or change a Direct_Reply_* setting.
  4. Observe that POP3Helper.stop() clears the interval, but never invokes any close/end/destroy operation on the active @rocket.chat/poplib client and never removes its listeners.

A focused regression test using a mocked POP3 client confirms that stop() makes zero socket-close calls. A local TCP integration check also confirms that explicitly destroying the underlying client closes the active connection promptly.

Expected behavior:

Stopping the POP3 direct-reply helper should:

  • clear the polling interval;
  • close the active POP3 socket;
  • remove the active client's listeners and retained reference;
  • report itself as inactive.
Actual behavior:

Only the interval is cleared. The active POP3 interceptor, socket, and listeners remain referenced.

Server Setup Information:
  • Version of Rocket.Chat Server: current develop at 9971f492da
  • Deployment Method: local source checkout
  • Operating System: macOS
  • Other fields: not applicable to this code-path reproduction
Client Setup Information

Not applicable.

Additional context

This is a focused code-path and socket-lifecycle reproduction. It is not based on a heap profile or long-running soak test.

No matching existing issue or pull request was found for the POP3 shutdown path.

Lingua principale
TypeScript
Stelle
46.5k
Fork
14.1k
Merge medio
1g 21h
PR unite (30g)
381

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/Rocket.Chat

Tutte le issue di RocketChat/Rocket.Chat

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.