mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add Storage::is_connected BIF
This commit is contained in:
parent
cbc41e298d
commit
58ee8d3c5c
8 changed files with 42 additions and 0 deletions
|
@ -24,6 +24,8 @@ event zeek_init() {
|
|||
|
||||
local b = open_res$value;
|
||||
|
||||
print "Opened handle is open", Storage::is_open(b);
|
||||
|
||||
local bad_key: count = 12345;
|
||||
local value = "abcde";
|
||||
local res = Storage::Sync::put(b, [$key=bad_key, $value=value]);
|
||||
|
@ -31,6 +33,10 @@ event zeek_init() {
|
|||
|
||||
# Close the backend and then attempt to use the closed handle
|
||||
Storage::Sync::close_backend(b);
|
||||
|
||||
# Test if the now-closed backend is open.
|
||||
print "Closed backend is open", Storage::is_open(b);
|
||||
|
||||
local res2 = Storage::Sync::put(b, [$key="a", $value="b"]);
|
||||
print "Put result on closed handle", res2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue