LiftSession.cometSetup wrong message order. Lift 2.6

45 views
Skip to first unread message

Alexander Nemish

unread,
Jan 30, 2015, 4:44:32 AM1/30/15
to lif...@googlegroups.com
Hi there,

When you send messages to a Comet Actor with session.sendCometActorMessage which isn't set up yet, Lift stores messages in LiftSession.cometSetup List:

def setupComet(theType: String, name: Box[String], msg: Any) {
testStatefulFeature {
cometSetup.atomicUpdate(v => (Full(theType) -> name, msg) :: v)
}
}

Later, when the Comet Actor is set up, the messages are sent back to the actor in LiftSession.findComet:

for {
actor <- ret
(cst, csv) <- cometSetup.is if cst == what
} actor ! csv

Notice that Lift prepends messages to cometSetup List and reads those from head to tail, hence it sends messages in reverse order.
Which is, well, not what you expect from an actor.

Is it expected behaviour or a bug? Lift 2.6

Cheers,
Alex Nemish 


Antonio Salazar Cardozo

unread,
Jan 30, 2015, 8:56:14 AM1/30/15
to lif...@googlegroups.com
Seems like a bug to me. Unless it's truly critical to you though I think it'll get fixed in Lift 3… We
don't currently have any further 2.x releases planned and this bug's been around for a while.
Thanks,
Antonio

Alexander Nemish

unread,
Jan 30, 2015, 9:04:25 AM1/30/15
to lif...@googlegroups.com
Thank you, Antonio.


We found a way to work it around so it's not so critical.

Cheers,
Alex Nemish

Antonio Salazar Cardozo

unread,
Jan 30, 2015, 11:41:50 AM1/30/15
to lif...@googlegroups.com
Sweet, thanks. It should get fixed in Lift 3 fairly quickly, as it's not a super-complicated issue.
Thanks,
Antonio

Dave Briccetti

unread,
May 14, 2015, 1:13:26 AM5/14/15
to lif...@googlegroups.com
Hey, all fixed, in the master source code branch now.

Antonio Salazar Cardozo

unread,
May 20, 2015, 1:54:03 PM5/20/15
to lif...@googlegroups.com, dcbri...@gmail.com
You rock, thanks!
Antonio
Reply all
Reply to author
Forward
0 new messages