Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from mattn/destroy_session

Ignore exception to continue re-connection
  • Loading branch information...
commit ff34e7fc09c1aad1155030a9e62477ff670db5c1 2 parents 7e96f59 + d3c1ec2
@psychs authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lingr.rb
View
10 lingr.rb
@@ -193,8 +193,12 @@ def create_session
def destroy_session
debug { "requesting session/destroy" }
- res = post("session/destroy", :session => @session)
- debug { "session/destroy response: #{res.inspect}" }
+ begin
+ res = post("session/destroy", :session => @session)
+ debug { "session/destroy response: #{res.inspect}" }
+ rescue Exception => e
+ log_error { "error in destroy_session: #{e.inspect}" }
+ end
@session = nil
@nickname = nil
@public_id = nil
@@ -203,8 +207,6 @@ def destroy_session
@username = nil
@rooms = {}
res
- rescue Exception => e
- log_error { "error in destroy_session: #{e.inspect}" }
end
def set_presence(presence)
Please sign in to comment.
Something went wrong with that request. Please try again.