Avatar

Level 2

1. Unsubscribe, Close CollectionNodes.

2. Logout user with session.logout()

3. Login user.

4. Create CollectionNode. AddEventListener on Sync Events.

5. No Event.

Is it bug? Ot maybe I should now to totally logout client.

this.rtcService.releaseSubscribers();
this.rtcService.close();
this.sessionService.close();

RTCService - releaseSubscribers

if (_webcamSubscriber != null) {
     _webcamSubscriber.removeEventListener(StreamEvent.STREAM_DELETE, onCompanionStreamDelete);
     _webcamSubscriber.removeEventListener(StreamEvent.STREAM_PAUSE, onCompanionStreamPause);
     _webcamSubscriber.close();
     _webcamSubscriber = null;
}

RTCService - close

_userManager = null;
_userDescriptor = null;

_collectionVacantUsers.removeEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncCollectionNode);
_collectionVacantUsers.unsubscribe();
_collectionVacantUsers.close();
_collectionVacantUsers = null;

_collectionChat.removeEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceiveChatCollectionNode);
_collectionChat.unsubscribe();
_collectionChat.close();
_collectionChat = null;

_webcamPublisher.removeEventListener(Event.CHANGE, onWebcamChange);
_webcamPublisher.close();
_webcamPublisher = null;

_connectionTimeout.removeEventListener(TimerEvent.TIMER, onConnectionTimer);
_connectionTimeout.removeEventListener(TimerEvent.TIMER_COMPLETE, onConnectionTimerComplete);
_connectionTimeout.reset();
_connectionTimeout = null;

SessionService

public function close() : void {
     this.registerSession(null);
}

public function registerSession($session : ConnectSession) : void {
     if (_session != null) {
          _session.removeEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
          _session.logout();
          _session.close();
     }

     _session = $session;

     if (_session != null) {
          _session.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE, onLogin);
          _session.login();
     }
}

Event doesn't fire

CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncCollectionNode