提交 b2b2ab16 编写于 作者: K kohsuke

Set time out to avoid infinite hang when SMTP servers don't respond in time.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18959 71c3de6d-444a-0410-be80-ed276b4c234a
上级 34f58bf0
......@@ -231,6 +231,11 @@ public class Mailer extends Notifier {
}
if(getSmtpAuthUserName()!=null)
props.put("mail.smtp.auth","true");
// avoid hang by setting some timeout.
props.put("mail.smtp.timeout","60000");
props.put("mail.smtp.connectiontimeout","60000");
return Session.getInstance(props,getAuthenticator());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册