Skip to content

Commit 6708376

Browse files
authored
Detach client event handler when detaching IsolatedWorld (#2298)
1 parent 4bf7716 commit 6708376

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/PuppeteerSharp/IsolatedWorld.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ internal async Task<IJSHandle> AdoptHandleAsync(IJSHandle handle)
141141
internal void Detach()
142142
{
143143
_detached = true;
144+
_client.MessageReceived -= Client_MessageReceived;
144145
TaskManager.TerminateAll(new Exception("waitForFunction failed: frame got detached."));
145146
}
146147

0 commit comments

Comments
 (0)