Hello,
We are using the latest version of smtpmail. However we are confronted lots of times with error 'Error ** Attempt to write to closed stream sLogfile. (1387)'.
Looking at the program I find 2 times "run cleanup".
Cleanup closes the stream sLogfile.
Maybe this is causing the problem?
If you have an solution or tip to solve this problem, you can contact me on luc.bosman@be.rhenus.com.
Many thanks!
start-etime = ETIME.
DO WHILE sending:
RUN readHandler. / 2/25/09 PK - was PROCESS EVENTS. /
IF vstate < 0 THEN RUN Cleanup.
PAUSE 1.
/ Build in timer in case sending is never set to NO
this will terminate the program after 60 seconds
start-Etime will be reset by WriteData each time there
is activity on the socket to allow for long transmissions /
IF start-etime + 60000 < ETIME THEN DO:
sending = NO.
{&LOGGER} "Connection Timed out." SKIP.
RUN Cleanup.
END.
END.
Luc Bosman
Hello,
Modify Cleanup procedure: