Permalink
Browse files

Check switchboard exists before closing connection

  • Loading branch information...
asterite committed Nov 5, 2012
1 parent 386781a commit 547f84af94b898641d5f73b2852c35294dbd2dcb
Showing with 1 addition and 5 deletions.
  1. +1 −1 lib/msn/notification_server.rb
  2. +0 −4 lib/msn/protocol.rb
@@ -104,7 +104,7 @@ def create_switchboard(email, host_and_port)
def destroy_switchboard(email)
switchboard = @switchboards.delete email
- switchboard.close_connection
+ switchboard.close_connection if switchboard
end
def unbind
View
@@ -108,9 +108,5 @@ def clear_event(kind)
def method_missing(name, *args)
send_command name.upcase, *args
end
-
- def unbind
- puts "Chau :-("
- end
end

0 comments on commit 547f84a

Please sign in to comment.