raiseEvent not working when called from applicationSuspend

Say there are 2 players, Jack and Jill,  connected to a room. 

Jack is quitting the game and his applicationSuspend event is dispatched.
Now I wish to send a message to Jill from this applicationSuspend listener function.
So I raise an event using raiseEvent

But the event is not raised in Jill’s client.
Only if Jack resumes the game, this event is raised for Jill.

Is this a bug?
 

The same goes for setCustomProperty for rooms as well… 
The room property is set only if the suspended player resumes…

So basically I’m guessing nothing would work on applicationSuspend. 
Can anyone confirm this?

Client can send events only while joined to the room (rooms are specially designed for events exchange).

Same for setCustomProperty. Client can set room property only while joined that room.

In my scenario, they are joined to the room. 
Some time after they are joined to the room, when one of them suspends, events are not raised from the suspend listener. 

Just to be clear, I am talking about Corona’s onSuspend(http://docs.coronalabs.com/api/event/system/type.html#example)  listener, not the onActorSuspend listener of Photon Cloud plugin.

 

You wrote:

Jack is quitting the game and his applicationSuspend event is dispatched.

I thought that quitting the game means leaving the room.

But even if client is still in room but application is suspended, it can’t ping server and server drops connection after several seconds. If that occur, you need to reconnect.

Yes that’s true enough. 

But I want to send a message right before the app suspends.

The onApplicationSuspend listener gets called right before the application gets suspended. So at that point, the connections are good

So If I want to raise an event from that listener function in the same frame, I should be able to, right? 

You may try to call LoadBalancingClient service() right after sending event or setting properties.

Aye! That works.

I had previously had loadbalancingClient:service called using an infinite timer, so that had been the problem… 

Thanks a lot!! 
 

The same goes for setCustomProperty for rooms as well… 
The room property is set only if the suspended player resumes…

So basically I’m guessing nothing would work on applicationSuspend. 
Can anyone confirm this?

Client can send events only while joined to the room (rooms are specially designed for events exchange).

Same for setCustomProperty. Client can set room property only while joined that room.

In my scenario, they are joined to the room. 
Some time after they are joined to the room, when one of them suspends, events are not raised from the suspend listener. 

Just to be clear, I am talking about Corona’s onSuspend(http://docs.coronalabs.com/api/event/system/type.html#example)  listener, not the onActorSuspend listener of Photon Cloud plugin.

 

You wrote:

Jack is quitting the game and his applicationSuspend event is dispatched.

I thought that quitting the game means leaving the room.

But even if client is still in room but application is suspended, it can’t ping server and server drops connection after several seconds. If that occur, you need to reconnect.

Yes that’s true enough. 

But I want to send a message right before the app suspends.

The onApplicationSuspend listener gets called right before the application gets suspended. So at that point, the connections are good

So If I want to raise an event from that listener function in the same frame, I should be able to, right? 

You may try to call LoadBalancingClient service() right after sending event or setting properties.

Aye! That works.

I had previously had loadbalancingClient:service called using an infinite timer, so that had been the problem… 

Thanks a lot!!