POP3 direct-reply interceptor leaves active connection open when stopped

Abierto
#43,395 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Shreyas2004wagh ya está trabajando en esto.

Desde el 1/11/2026.

  • #43396 de @Shreyas2004wagh — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
46.5k
Forks
14.1k
Merge medio
1 d 21 h
PR fusionados (30 d)
381

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketChat/Rocket.Chat

Todos los issues de RocketChat/Rocket.Chat

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.