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-15 21:06:17 +0100 |
commit | 166ae89dfa36b8e844e58e61e3838200c4ab8ab7 (patch) | |
tree | c0d81591333a8a234b3a9cdc4e6dc704ad9f39bd /lib/mattermost | |
parent | 4b23764da7622ae6bc40697c7c623df901cae01b (diff) | |
download | gitlab-ce-166ae89dfa36b8e844e58e61e3838200c4ab8ab7.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 |