Solution proposed by Nobody is correct, but also the other change must be done
(In SmtpProxy.Open(), besides this.ReceiveTimeout also this.SendTimeout must be set.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: NO
I believe this is resolved by moving the LoopTimeout declaration outside of the do/while loop in the SmtpProxy.ReadResponse() method.
Original code:
...
int count = 0;
// read until last response has been received
// (indicated by whitespace after the numerical response code)
do
{
int LoopTimeout = 0;
if (stream.DataAvailable)
{
count = stream.Read(serverbuff, 0, serverbuff.Length);
response = String.Concat(response, enc.GetString(serverbuff, 0, count));
}
...
============================================
Modified code:
...
int count = 0;
int LoopTimeout = 0;
// read until last response has been received
// (indicated by whitespace after the numerical response code)
do
{
if (stream.DataAvailable)
{
count = stream.Read(serverbuff, 0, serverbuff.Length);
response = String.Concat(response, enc.GetString(serverbuff, 0, count));
}
...
============================================
Logged In: NO
Solution proposed by Nobody is correct, but also the other change must be done
(In SmtpProxy.Open(), besides this.ReceiveTimeout also this.SendTimeout must be set.)