ruby / ruby/net-smtp

Replace Timeout.timeout with TCPSocket.open(open_timeout:) when available

Open
#94 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
70
Forks
34
PR merge metrics
No merged PRs in 30d

Description

It would be great to make an equivalent change here similar to what @osyoyu did in https://github.com/ruby/net-http/pull/224!

Some justification copied over from that PR's description:

The builtin timeout in TCPSocket.open is better in several ways. First, it does not rely on a separate Ruby Thread for monitoring Timeout (which is what the timeout library internally does). Also, it is compatible with Ractors, since it does not rely on Mutexes (which is also what the timeout library does).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SMTP connection code that uses Timeout.timeout and compare the requested approach with the linked net-http pull request. Check how the available and unavailable TCPSocket.open(open_timeout:) cases are handled, then run the relevant existing tests and confirm timeout behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
networking
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.