private void OnMessage(IConnection connection, string message)
{
connection.Trace(TraceLevels.Messages, "LP: OnMessage({0})", message);
var shouldReconnect = ProcessResponse(connection, message);
if (IsReconnecting(connection))
{
// If the timeout for the reconnect hasn't fired as yet just fire the
// event here before any incoming messages are processed
TryReconnect(connection, _reconnectInvoker);
}
if (shouldReconnect)
{
// Transition into reconnecting state
connection.EnsureReconnecting();
}
}