summaryrefslogtreecommitdiff
path: root/lib/mattermost/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mattermost/session.rb')
-rw-r--r--lib/mattermost/session.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb
index dcdff94814c..670f83bb6bc 100644
--- a/lib/mattermost/session.rb
+++ b/lib/mattermost/session.rb
@@ -30,6 +30,8 @@ module Mattermost
begin
yield self
+ rescue Errno::ECONNREFUSED
+ raise NoSessionError
ensure
destroy
end
@@ -112,4 +114,4 @@ module Mattermost
end
end
end
-end \ No newline at end of file
+end