mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
llcache: Abort cleanly if called back during shutdown
In order to help us debug shutting down with active fetches, this will abort the process cleanly if we get a callback to an "active" llcache handle after the abort process has actually killed them all. This can happen with deferred fetcher aborts in the cURL fetcher. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
09fa61eb73
commit
659c9161ee
@ -2762,6 +2762,13 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
||||
llcache_object *object = p;
|
||||
llcache_event event;
|
||||
|
||||
if (llcache == NULL) {
|
||||
NSLOG(llcache, CRITICAL, "Callback happened after llcache finalisation");
|
||||
assert(false);
|
||||
/* In case assertions are off, return here */
|
||||
return;
|
||||
}
|
||||
|
||||
NSLOG(llcache, DEBUG, "Fetch event %d for %p", msg->type, object);
|
||||
|
||||
switch (msg->type) {
|
||||
|
Loading…
Reference in New Issue
Block a user