def handle_output
@outbuffer = @pstack.filter_call(:filter_out,@outbuffer)
done = @sockio.write(@outbuffer)
@outbuffer = ""
if done
@write_blocked = false
else
@write_blocked = true
end
rescue EOFError, Errno::ECONNABORTED, Errno::ECONNRESET
@closing = true
publish(:disconnected)
unsubscribe_all
log.info "(#{self.object_id}) Connection '#{@host}(#{@addr})' disconnecting"
rescue Exception
@closing = true
publish(:disconnected)
unsubscribe_all
log.error "(#{self.object_id}) Connection#handle_output disconnecting"
log.error $!
end