mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
Add IN_PROGRESS return code, handle for async backends
This commit is contained in:
parent
60aa987e06
commit
c7503654e8
6 changed files with 21 additions and 11 deletions
|
@ -76,7 +76,7 @@ zeek::expected<BackendPtr, std::string> Manager::Instantiate(const Tag& type) {
|
|||
OperationResult Manager::OpenBackend(BackendPtr backend, RecordValPtr options, TypePtr key_type, TypePtr val_type,
|
||||
OpenResultCallback* cb) {
|
||||
auto res = backend->Open(std::move(options), std::move(key_type), std::move(val_type), cb);
|
||||
if ( res.code != ReturnCode::SUCCESS ) {
|
||||
if ( res.code != ReturnCode::SUCCESS && res.code != ReturnCode::IN_PROGRESS ) {
|
||||
res.err_str = util::fmt("Failed to open backend %s: %s", backend->Tag(), res.err_str.c_str());
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue