diff --git a/shard.yml b/shard.yml index dfd6e56..0b7eaa2 100644 --- a/shard.yml +++ b/shard.yml @@ -1,10 +1,10 @@ name: lucky_flow -version: 0.6.2 +version: 0.6.3 authors: - Paul Smith -crystal: 0.31.1 +crystal: 0.34.0 license: MIT diff --git a/src/lucky_flow/server.cr b/src/lucky_flow/server.cr index e8647aa..09dcd3b 100644 --- a/src/lucky_flow/server.cr +++ b/src/lucky_flow/server.cr @@ -41,18 +41,22 @@ class LuckyFlow::Server start_session end - private def start_session - driver = Selenium::Webdriver.new - Selenium::Session.new(driver, capabilities) - # If less than 0.34.0 {% if compare_versions(Crystal::VERSION, "0.34.0") == -1 %} + private def start_session + driver = Selenium::Webdriver.new + Selenium::Session.new(driver, capabilities) rescue e : Errno + retry_start_session(e) + end {% else %} + private def start_session + driver = Selenium::Webdriver.new + Selenium::Session.new(driver, capabilities) rescue e : IO::Error + retry_start_session(e) + end {% end %} - retry_start_session(e) - end private def retry_start_session(e) if Time.utc <= @retry_limit.not_nil! diff --git a/src/lucky_flow/version.cr b/src/lucky_flow/version.cr index 8f0fbe1..bd6ee67 100644 --- a/src/lucky_flow/version.cr +++ b/src/lucky_flow/version.cr @@ -1,3 +1,3 @@ class LuckyFlow - VERSION = "0.6.2" + VERSION = "0.6.3" end