Comet transport fix.

NPE were fixed for improve snippet rendering time.

The problem is occurred by ask comet actor for render before it was initialized.
Comet actor installation is
```scala
    // This is how we install our own comet actors in Lift
    S.withAttrs(new UnprefixedAttribute("type", "reactive.web.ReactionsComet", new UnprefixedAttribute("name", page.id, Null))) {
      net.liftweb.builtin.snippet.Comet.render(NodeSeq.Empty)
    }
```
Comet actor creation is calling from 'lift session'
```scala
    LiftRules.cometCreation.append {
      case CometCreationInfo("reactive.web.ReactionsComet", name, defaultXml, attributes, session) if _overrideCometHack.value.isDefined =>
        val comet = _overrideCometHack.value.get
        comet.initCometActor(session, Full("reactive.web.ReactionsComet"), name, defaultXml, attributes)
        comet
    }
```
So our lift comet actor can be initialised in 'any time'. And this moment can be after asking comet actor for render.
```scala
        comet !? (comet.cometRenderTimeout, AskRender) foreach {
          case AnswerRender(_, _, when, _) =>
            page.queue(s"var lift_toWatch = lift_toWatch || {}; lift_toWatch['${comet.uniqueId}'] = $when;")
        }
```
In this case is NPE in CometActor occur.

I think that the simplest solution is using Future, Promise, Await for ask comet for render only after comet initialization.
I mean the identifier of the val.
On Sep 8, 2014 3:34 AM, "Vitaly" <notifications@github.com> wrote:

> In
> reactive-web-lift/src/main/scala/reactive/web/lift/LiftCometTransportType.scala:
>
> >  object LiftCometTransportType {
> > +  private val contType = "reactive.web.ReactionsComet"
>
> I've taken the name of value from CometCreationInfo. Which name would you
> prefer?
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/nafg/reactive/pull/98/files#r17225001>.
>