are there commands similar to WEB STOP SERVER and STOP SQL SERVER but to reject new connections on my 4d server?
Asked
Active
Viewed 101 times
1
-
i wanted to do both actually. my goal is to prevent external operations to come into the server while i am performing some critical operations to avoid bringing an inconcistency somewhere. – Gers Aug 27 '18 at 07:21
1 Answers
2
i found out that by using the On Server Open Connection Database Method , i can reject new connections by returning a value different than 0 as seen in the doc
If you do not return a value in $0, thereby leaving the variable undefined or initialized to zero, 4D Server assumes that the database method accepts the connection. If you do not accept the connection, you return a non-null value in $0.
so i just change the return value $0 under the conditions i need
If(*some conditions*)
$0:1
End If

Gers
- 572
- 1
- 4
- 15