foens / hpop

OpenPOP.NET code repository
http://hpop.sourceforge.net/
204 stars 114 forks source link

Infinite timeout receiveTimeout and sendTimeout not working #69

Open Powlinz opened 6 years ago

Powlinz commented 6 years ago

When trying to connect using receiveTimeout and sendTimeout using no timeout there is no way to get it working.

TcpClient is used so the infinite timeout is System.Threading.Timeout.Infinite = -1 and OpenPop3.NET is throwing an exception when < 0

if (receiveTimeout < 0) throw new ArgumentOutOfRangeException("receiveTimeout"); if (sendTimeout < 0) throw new ArgumentOutOfRangeException("sendTimeout");