Jelajahi Sumber

Merge pull request #7 from cgf1/main

* lib/Selenium/Client.pm (DESTROY): Localize $? to prevent it from af…
George S. Baugh 4 tahun lalu
induk
melakukan
30eb1035a2
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      lib/Selenium/Client.pm

+ 2 - 0
lib/Selenium/Client.pm

@@ -343,6 +343,8 @@ sub _wait ($self) {
 sub DESTROY($self) {
     return unless $self->{auto_close};
 
+    local $?; # Avoid affecting the exit status
+
     print "Shutting down active sessions...\n" if $self->{debug};
     #murder all sessions we spawned so that die() cleans up properly
     if ($self->{ua} && @{$self->{sessions}}) {