Client/Server Reconnect
Posted: Fri Aug 23, 2019 2:17 pm
Has anyone successfully been able to capture an error 4618 or 4620 and have their program shutdown properly upon a disconnection between the client and the server? We have been trying to establish an error trap routine to do so and cannot get it to trigger our error trap.
We have this in our BRCONFIG
CLIENT_SERVER RECONNECT_AFTER=20 RECONNECT_TIME=60
It goes through the process and loses the connection if we pull the ethernet cable to a workstation. It will properly reconnect if you plug it back in within the allotted time. What we cannot get it to do is go through an error routine on the server end to properly close files.
Here is my example program to test I am just trying to trap for an error if it occurs when it has disconnected.
I don't get an errors.lst file created. So my program is not quietly shutting down like I would expect it to. Has anyone been able to make this work?
We have this in our BRCONFIG
CLIENT_SERVER RECONNECT_AFTER=20 RECONNECT_TIME=60
It goes through the process and loses the connection if we pull the ethernet cable to a workstation. It will properly reconnect if you plug it back in within the allotted time. What we cannot get it to do is go through an error routine on the server end to properly close files.
Here is my example program to test I am just trying to trap for an error if it occurs when it has disconnected.
Code: Select all
00980 On Error Goto ERR_TRAP
00985 Print Fields "1,10,C": " ."
00990 Let SLEEP(5)
00995 Print Fields "1,10,C": ". "
01000 Goto 990
10000 ERR_TRAP:
10130 Open #1: "name=errors.lst,replace",Display,Output
10135 Print #1: "Disconnected"
10140 Print #1: STR$(ERROR)
10150 Close #1:
10160 Execute "Sys" : End