소스 검색

Merge pull request #7 from cgf1/main

* lib/Selenium/Client.pm (DESTROY): Localize $? to prevent it from af…
George S. Baugh 4 년 전
부모
커밋
30eb1035a2
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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}}) {