disconnect()
public
Disconnects from the server.
Show source
def disconnect
begin
begin
@sock.io.shutdown
rescue NoMethodError
@sock.shutdown
end
rescue Errno::ENOTCONN
rescue Exception => e
@receiver_thread.raise(e)
end
@receiver_thread.join
synchronize do
@sock.close
end
raise e if e
end