wait to fill query

master
Christopher 2020-07-01 22:06:52 +02:00
parent 14b37c0844
commit 5493627981
1 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,7 @@ namespace OpenSim.Modules.EMail
private List<MimeMessage> m_sendMessages = new List<MimeMessage>();
private bool m_debug = false;
private int m_sending = 0;
private String SMTP_SERVER_HOSTNAME = null;
private String SMTP_SERVER_LOGIN = null;
@ -250,9 +251,16 @@ namespace OpenSim.Modules.EMail
private void sendAllMails(object sender, ElapsedEventArgs e)
{
int _currentUnixTime = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
if (m_sendMessages.Count == 0)
return;
if ((m_sending + 10) > _currentUnixTime)
return;
m_sending = _currentUnixTime + 5;
m_log.Info("[" + Name + "] Sending " + m_sendMessages.Count + " Mails.");
try
@ -307,6 +315,7 @@ namespace OpenSim.Modules.EMail
public void SendEmail(UUID objectID, string address, string subject, string body)
{
SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID);
m_sending = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
try
{