Explorar o código

Merge branch 'master' of github.com:aivaturi/Selenium-Remote-Driver

Gordon Child %!s(int64=14) %!d(string=hai) anos
pai
achega
b0734dc6cf
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lib/Selenium/Remote/Driver.pm

+ 2 - 0
lib/Selenium/Remote/Driver.pm

@@ -195,6 +195,7 @@ sub new {
         remote_conn        => undef,
         commands           => $ress,
         auto_close         => 1, # by default we will close remote session on DESTROY
+        pid                => $$,
     };
     bless $self, $class or die "Can't bless $class: $!";
 
@@ -225,6 +226,7 @@ sub new {
 
 sub DESTROY {
     my ($self) = @_;
+    return if $$ != $self->{pid};
     $self->quit() if ($self->{auto_close} && defined $self->{session_id});
 }