jcoglan/faye — Issue #112: transport:down doesn't get triggered when a client explicitly disconnects
Author: fd
Created: 2011-11-23 09:07:22+00:00
State: open

```ruby
require 'faye'
require 'eventmachine'

Faye::Logging.log_level = :debug

EM.run do

client = Faye::Client.new('http://localhost:3000/faye')

client.subscribe('/foo') do |message|
p message
client.disconnect
end

client.bind 'transport:down' do
puts "[CONNECTION DOWN]"
EM.stop
end

client.bind 'transport:up' do
puts "[CONNECTION UP]"
client.publish('/foo', 'text' => 'Hello world')
end

end
```