8000 fix: lower socket timeout for validating email domain by ankush · Pull Request #24915 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: lower socket timeout for validating email domain #24915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frappe/email/doctype/email_domain/email_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def validate_incoming_server_conn(self):
conn_method = poplib.POP3_SSL if self.use_ssl else poplib.POP3

self.use_starttls = cint(self.use_imap and self.use_starttls and not self.use_ssl)
incoming_conn = conn_method(self.email_server, port=self.incoming_port)
incoming_conn = conn_method(self.email_server, port=self.incoming_port, timeout=30)
incoming_conn.logout() if self.use_imap else incoming_conn.quit()

@handle_error("outgoing")
Expand All @@ -123,4 +123,4 @@ def validate_outgoing_server_conn(self):
elif self.use_tls:
self.smtp_port = self.smtp_port or 587

conn_method((self.smtp_server or ""), cint(self.smtp_port)).quit()
conn_method((self.smtp_server or ""), cint(self.smtp_port), timeout=30).quit()
0