1

Closed

SimpleSmtpServer.Start should return only when initialization has been made

description

Currently, when the SimpleSmtpServer.Start method is called, a new thread is created and the control is returned directly to the calling code.
This can be problematic if the SimpleSmtpServer.Stop method is directly executed after a call to the Start method.
 
Attached is a new version of SimpleSmtpServer.cs that fixes the problem by using a WaitHandle so that the Start method only returns when the initialization has been made.
 
This file was modified based on the 1.2.0 source code of netdumbster.

file attachments

Closed Sep 12, 2011 at 10:17 AM by cmendible
Fixed @github: http://goo.gl/FTM6e

comments

nuno_araujo_bsa wrote Sep 8, 2011 at 6:48 AM

Sorry, my first attachment was wrong. Please use the new one

cmendible wrote Sep 8, 2011 at 8:12 AM

Can you please submit a patch file for the fix and a test for it?

wrote Sep 12, 2011 at 10:17 AM

wrote Feb 13, 2013 at 10:46 PM

wrote May 16, 2013 at 3:52 AM