I did a small test with simple socket code and it seems that the problem is not in JavaMail but in the operating system itself. I ran the program in windows, solaris & linux and had this problem in both solaris & linux but not in windows...
scorpion10 wrote:
I am using JavaMail 1.4.2 and I tried to connect to a SMTP server with a port that has a CLOSE_WAIT (checked by doing a netstat) state. I have set both connectiontimeout & timeout values to 10 seconds but the calls for trans.connect() never returns or throws exception until like for 3 to 4 minutes..Could anybody please explain how Ican overcome this problem?