Bill Crowell wrote:

TIMEOUTidle = 30 

TIMEOUTbusy = 5 
TIMEOUTclose = 0


So for some strange reason you decided to drop any buffered data on close (TIMEOUTclose = 0) ...

2010.10.15 10:05:04 LOG7[946:3077921648]: Socket closed on read 
2010.10.15 10:05:04 LOG7[946:3077921648]: SSL write shutdown 
2010.10.15 10:05:04 LOG7[946:3077921648]: SSL alert (write): warning: close notify 
2010.10.15 10:05:04 LOG6[946:3077921648]: SSL_shutdown successfully sent close_notify 
2010.10.15 10:05:04 LOG6[946:3077921648]: s_poll_wait timeout: connection close


... and that's exactly what stunnel did.

Mike