POP3 direct-reply interceptor leaves active connection open when stopped

オープン
#43,395 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Shreyas2004wagh がすでに取り組んでいます。

2026年11月1日 から。

  • #43396 @Shreyas2004wagh による — オープン

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
46.5k
フォーク
14.1k
平均マージ
1日 21時間
マージ済み PR(30日)
381

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RocketChat/Rocket.Chat のほかの issue

RocketChat/Rocket.Chat の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。