Skip to content

Commit

Permalink
Use safe-navigation operator in SocketPoller#listening?
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Apr 18, 2019
1 parent 1a7c651 commit 758119f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/socket_poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def listening?
sock.close
true
rescue *NOT_CONNECTED_ERRORS
sock.close if sock
sock&.close
WebDriver.logger.debug("polling for socket on #{[@host, @port].inspect}")
false
end
Expand Down

0 comments on commit 758119f

Please sign in to comment.