Skip to content

Commit 7600b15

Browse files
committed
Increment SESSION_COUNT when cloning a Session.
Fixes #8166.
1 parent c097ec9 commit 7600b15

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

rust/src/headless.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,15 @@ impl Session {
422422
}
423423
}
424424

425+
impl Clone for Session {
426+
fn clone(&self) -> Self {
427+
SESSION_COUNT.fetch_add(1, SeqCst);
428+
Self {
429+
license_duration: self.license_duration,
430+
}
431+
}
432+
}
433+
425434
impl Drop for Session {
426435
fn drop(&mut self) {
427436
let previous_count = SESSION_COUNT.fetch_sub(1, SeqCst);

0 commit comments

Comments
 (0)