danielc
Jul 07, 2022Cirrus
Solved
A simple way to unset all variable during Client_CLOSED ?
Hello,
I have a CLOSED_CONNECTION irule at the end of the VS to unset all variables:
when CLIENT_CLOSED {
TCP::close
if { [info exists demo1] } {
unset demo1
}
if { [info exists demo2] } {
unset demo2
}
,,,,,
}
However If I have 1000 variable sauy demo1 to demo1000, then I will need to if 1000 times here to unset them, Is there any simple way can unset all variables during CLIENT_CLOSED ? Thanks
Variables are scoped to the connection. After its closed they no longer exist. The only time this is not the case when you create global variables via rule_init. So there is no need to delete these.