#9: handle lost TCP connections

Readable? Comments?? What have you done with Josh Szmajda????

On Thursday, November 20, 2014, Josh Szmajda <notifications@github.com>
wrote:

> In lib/rack/amqp/server.rb:
>
> > -              correlation_id: message_id,
> > -              type: 'REPLY',
> > -              app_id: server_agent,
> > -              timestamp: Time.now.to_i,
> > -              headers: headers
> > -            }
> > -            if type = headers['Content-Type']
> > -              amqp_headers[:content_type] = type
> > -            end
> > -            if enc = headers['Content-Encoding']
> > -              amqp_headers[:content_encoding] = enc
> > -            end
> > -
> > -            chan.direct("").publish(response, amqp_headers)
> > +          client.on_tcp_connection_loss do |connection, _|
> > +            connection.reconnect(false, 10)
>
> we could just do inline assignments to keep it readable, or comments
>
> connection.reconnect(whatever = false, reconnect_delay = 10)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rack-amqp/jackalope/pull/15/files#r20653236>.
>