@ray-js/robot-data-stream 0.0.12-beta-15 → 0.0.13-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -458,11 +458,6 @@ export class SweeperP2p extends P2pApi {
458
458
  return;
459
459
  }
460
460
  const cacheSerialNumber = this.packetSerialNumberCacheMap.get(fileName);
461
- if (fileName.includes('cleanPath')) {
462
- logger('info', {
463
- msg: `receive a path package, ${fileSerialNumber}, ${packetIndex}, ${packetType}, ${cacheSerialNumber}}`
464
- }, this.onLogger);
465
- }
466
461
 
467
462
  // 说明收到了过时包的数据
468
463
  if (fileSerialNumber < cacheSerialNumber) return;
package/lib/index.js CHANGED
@@ -28,7 +28,6 @@ const useP2PDataStream = (devId, onReceiveMapData, onReceivePathData, opt) => {
28
28
  }, onLogger);
29
29
  isAppOnBackground.current = true;
30
30
  if (isInit.current) {
31
- // 判断进入后台之后,维持定时器,如果进入后台超过2分钟, 则断开P2P
32
31
  timer.current = setTimeout(() => {
33
32
  logger('info', {
34
33
  msg: `background timer has been exe,isAppOnBackground: ${isAppOnBackground.current}`
@@ -45,6 +44,10 @@ const useP2PDataStream = (devId, onReceiveMapData, onReceivePathData, opt) => {
45
44
  logger('info', {
46
45
  msg: 'hooks onAppShow'
47
46
  }, onLogger);
47
+ logger('info', {
48
+ msg: `clear timer ${timer.current}`
49
+ }, onLogger);
50
+ isAppOnBackground.current = false;
48
51
  timer.current && clearTimeout(timer.current);
49
52
  setTimeout(() => {
50
53
  var _ty$p2p$isP2PActiveSy, _ty$p2p, _ty$p2p$isP2PActiveSy2, _ty$p2p2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/robot-data-stream",
3
- "version": "0.0.12-beta-15",
3
+ "version": "0.0.13-beta-1",
4
4
  "description": "扫地机P2P数据流标准化组件",
5
5
  "main": "lib/index",
6
6
  "files": [