[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Classpath-inetlib] Sending SMTP message gets stuck upon exception
From: |
Øyvind Harboe |
Subject: |
[Classpath-inetlib] Sending SMTP message gets stuck upon exception |
Date: |
Sat, 24 Jan 2004 19:10:32 +0100 |
If an exception is thrown while an SMTP message body is being written,
the subsequent "QUIT" command is ignored because it is considered part of the
message body by the SMTP server. This eventually causes the app to wait
indefinitely for the QUIT command to complete.
The patch attached is incomplete and is only intended for illustrative purposes.
// application level code
try
{
transport.sendMessage(message, message.getAllRecipients());
}
finally
{
// executes QUIT command , but will hang indefinitely if
// SMPTTransport.java mimeMessage.writeTo() throws e.g. a
// runtime exception.
transport.close();
}
Øyvind
patch.txt
Description: Text Data
- [Classpath-inetlib] Sending SMTP message gets stuck upon exception,
Øyvind Harboe <=