fix data leaking from one instance to the other when UUIDs match

This commit is contained in:
Daniella / Tove 2022-07-03 16:08:07 +02:00
parent c7d3e51ba8
commit 0799bd9aad

View file

@ -60,7 +60,7 @@ public class BrowserContext {
}
public static Task<BrowserContext> get(UUID browserUUID, String cookie, IRequestCatcher requestCatcher) {
if(sessions.containsKey(browserUUID))
if(sessions.containsKey(browserUUID) && sessions.get(browserUUID).requestCatcher == requestCatcher)
return t((res, rej) -> res.call(sessions.get(browserUUID)));
return create(cookie, requestCatcher);
}