Refresh guest deadline after MySQL hostcalls

This commit is contained in:
udo
2026-07-15 09:18:35 +00:00
parent ee022f0398
commit 82aec81465
4 changed files with 77 additions and 1 deletions
+2 -1
View File
@@ -2416,7 +2416,7 @@ private:
return(std::monostate());
}));
if(mod == "env" && name == "uce_host_mysql")
return(add([self](Caller, Span<const Val> args, Span<Val> results) -> Result<std::monostate, Trap> {
return(add([self](Caller caller, Span<const Val> args, Span<Val> results) -> Result<std::monostate, Trap> {
String encoded;
self->hostcall_read(args[0].i32(), args[1].i32(), encoded);
u32 cap = (u32)args[3].i32();
@@ -2499,6 +2499,7 @@ private:
}
if(buf != 0 && cap >= out.size())
self->hostcall_write(buf, out);
caller.context().set_epoch_deadline(self->worker.cfg.epoch_deadline_ticks);
results[0] = Val((int32_t)out.size());
return(std::monostate());
}));