Skip to content

fix: In SMTP loop, reset transport_id and from when disconnecting - #8797

Merged
Hocuri merged 2 commits into
mainfrom
hoc/set-transport-id-when-disconnecting
Oct 2, 2026
Merged

Hocuri merged 2 commits into
mainfrom
hoc/set-transport-id-when-disconnecting

Conversation

@Hocuri

@Hocuri Hocuri commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Previously, when we disconnected from the current transport, we forgot to reset the transport_id. I couldn't find any bug that is caused by this today, but it was a lingering problem.

Previously, when we disconnected from the current transport, we forgot
to reset the `transport_id`. I couldn't find any bug that is caused by
this today, but it was a lingering problem.

@link2xt link2xt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to reset everything, then self.from could be reset too, it is the address of the transport we are currently connected to.

Ideally from, transport_id and the connection itself should be all behind a single Option, current Smtp is just too stateful (has a lot of invalid states).

@Hocuri Hocuri changed the title fix: Reset transport_id when disconnecting fix: In SMTP loop, reset transport_id and from when disconnecting Oct 2, 2026
@Hocuri
Hocuri enabled auto-merge (squash) October 2, 2026 18:51
@Hocuri
Hocuri merged commit 7073049 into main Oct 2, 2026
30 checks passed
@Hocuri
Hocuri deleted the hoc/set-transport-id-when-disconnecting branch October 2, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants