truemail-rb / truemail

🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
https://truemail-rb.org/truemail-gem
MIT License
1.19k stars 60 forks source link

[QUESTION] Are configurable timeouts specified on seconds or milliseconds? #103

Closed wikiti closed 4 years ago

wikiti commented 4 years ago

New Issue Checklist

Issue Description

The documentation states the following for connection_timeout and response_timeout configuration options:

Optional parameter. Connection timeout is equal to 2 ms by default. Optional parameter. A SMTP server response timeout is equal to 2 ms by default.

I understand that timeouts are specified in milliseconds. However, after taking a look at the source code, it seems to me that Timeout.timeout is used to handle timeouts, which uses seconds.

Is the documentation wrong, or should timeouts be handled on milliseconds rather than seconds?

Complete output when running truemail, including the stack trace and command used
[INSERT OUTPUT HERE]
bestwebua commented 4 years ago

Hola, @wikiti! First of all I want to say thank you for your report. You're absolutely right! In point of fact Timeout.timeout, Net::SMTP#open_timeout, Net::SMTP#read_timeout use seconds, so Truemail uses seconds too. And this time there're wrong time units for configuration timeouts in readme and project docs. I will fix it today.

bestwebua commented 4 years ago

Fixed in readme and docs.