P
Peter Judge
Guest
Hi Bart, In the code you sent (which I've trimmed down), there's a G-Socket
ISCONNECT() line near the end (edit: line 19). I was wondering whether that line of code was executed when the user just closes the window (ie via [X] or some other means). If it does not, then you should clean up the socket on the window's ON CLOSE OF THIS-PROCEDURE trigger (or similar). I suspect that the socket is still open, even when the window has closed, because that line (19) deleting the socket in http-sendsms fails to run. PROCEDURE http-sendsms : ASSIGN P-error = FALSE. FOR EACH ttsendsms WHERE ttsendsms.sendsms: CREATE SOCKET G-Socket. G-Socket:CONNECT('-H ' + G-Host + ' -S 80') NO-ERROR. G-Socket:SET-READ-RESPONSE-PROCEDURE('getResponse',THIS-PROCEDURE). /* snipped a lot */ IF G-postdata ? THEN DO: RUN PostRequest (INPUT '/send.php', INPUT G-postData). WAIT-FOR READ-RESPONSE OF G-Socket. END. IF VALID-HANDLE(P-statushandle) THEN ASSIGN P-statushandle:SCREEN-VALUE = "Versturen: " + STRING(G-totaal-sendsmsen) + "/" + STRING(P-aantalsms). G-Socket
ISCONNECT() NO-ERROR. DELETE OBJECT G-Socket. END. END PROCEDURE.
Continue reading...
Continue reading...