Solved
Forum Discussion
hooleylist
Aug 22, 2014Cirrostratus
Yep, you can use [info exists varname] to check if a variable is defined. Or you could set it to a null value by default and then check it later to see if it's not null:
when HTTP_REQUEST {
if {$some_condition == 1}{
set sort_dest_pool "my_pool"
} else {
set sort_dest_pool ""
}
later...
if {$sort_dest_pool eq ""}{
Take some default action
} else {
pool $sort_dest_pool
}
}
Aaron