diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-15 21:06:17 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-17 10:31:14 +0100 |
commit | 9bcc4d4de5510a14ae891105645b4d59891ba78d (patch) | |
tree | c43c18c576d6250af5217516ee5935b4a389f2bd /lib/mattermost | |
parent | a31cdb29e49b62f0227963cbc54b6564a3ee9da8 (diff) | |
download | gitlab-ce-9bcc4d4de5510a14ae891105645b4d59891ba78d.tar.gz |
Ensure the session is destroyed
Diffstat (limited to 'lib/mattermost')
-rw-r--r-- | lib/mattermost/session.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb index d14121c91a0..f4629585da7 100644 --- a/lib/mattermost/session.rb +++ b/lib/mattermost/session.rb @@ -28,10 +28,12 @@ module Mattermost def with_session raise NoSessionError unless create - result = yield - destroy - result + begin + yield + ensure + destroy + end end # Next methods are needed for Doorkeeper |