You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It also fires two remote procedure calls at this point to get a list of events and then subscribes to a related channel for subsequent updates I've included one half of this below.
//initial abstract state
resolve: {
initConnection: ['SocketService',(SocketService)=>{returnPromise.all([SocketService.openConnection(),SocketService.getInitialEnquiries()]);}]// Socket servicegetInitialEnquiries(){returnthis.$wamp.call('store.enquiry.list',[['new','cancelled','in-progress']]).then(data=>{returnthis.EnquiryModel.setCollection(data.result);});}subscribeEnquiryStatus(){this.$wamp.subscribe('enquiry.channel',args=>{args.forEach(item=>{this.EnquiryModel.updateCollectionItem(item.id,item);});});}//etc etc
We listen for a logout event which we then use to fire a $wamp.close(). This all seems to work fine, but when we login again our initial abstract state resolve fails with the errors session not open for our calls. Once the message that we are connected again is received we can navigate to that state without issue and the calls work fine.
It seems like I need to somehow reset the connection to it's default state in order for it to queue the calls again but I would of thought the close itself would of handled that. Am i doing something wrong here as it seems related to #31
Also in the event that a network error happens and the connection drops I assume i'd need to fire those calls again to make sure my data is up to date but the subscriptions themselves should be still valid unless the connection completely times out and is closed. This will probably lead to similar problem as above.
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
I have an application that opens a connection once a user logs in via our apps initial abstract state resolve which calls the following in my service.
It also fires two remote procedure calls at this point to get a list of events and then subscribes to a related channel for subsequent updates I've included one half of this below.
We listen for a logout event which we then use to fire a
$wamp.close()
. This all seems to work fine, but when we login again our initial abstract state resolve fails with the errorssession not open
for our calls. Once the message that we are connected again is received we can navigate to that state without issue and the calls work fine.It seems like I need to somehow reset the connection to it's default state in order for it to queue the calls again but I would of thought the close itself would of handled that. Am i doing something wrong here as it seems related to #31
Also in the event that a network error happens and the connection drops I assume i'd need to fire those calls again to make sure my data is up to date but the subscriptions themselves should be still valid unless the connection completely times out and is closed. This will probably lead to similar problem as above.
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: