gemercheung 3 years ago
parent
commit
b8c80ed746
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/scene/scene.service.ts

+ 5 - 4
src/scene/scene.service.ts

@@ -301,9 +301,10 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
 
   async walking(req) {
     try {
-      // if(this.clickQueueSub){
-      //   this.clickQueueSub.unsubscribe();
-      // }
+      if (this.clickQueueSub) {
+        this.clickQueueSub.unsubscribe();
+        this.clickQueueSub = null;
+      }
       this.clickQueue.next(req);
       console.log('walking', this.clickQueueSub, JSON.stringify(req));
       // if (!this.clickQueueSub) {
@@ -599,7 +600,7 @@ export class SceneService implements OnModuleInit, OnModuleDestroy {
       this.requestIFrameQueueSub = this.requestIFrameQueue.subscribe(
         (frameData: StreamFrameType) => {
           const nextFrame = this.frameCnt.getValue() + 1;
-          this.logger.warn('lostIframe', nextFrame, JSON.stringify(frameData));
+          this.logger.warn('lostIframe', nextFrame,);
           frameData.frame = nextFrame;
           this.streamService.pushFrameToSteam(frameData);
           this.frameCnt.next(nextFrame);