648540858
2023-05-08 affbd89fdb7a1a0dbfea2d5ff871c1e4989aaff9
修复hook订阅移除失败的问题
1个文件已修改
6 ■■■■■ 已修改文件
src/main/java/com/genersoft/iot/vmp/media/zlm/ZlmHttpHookSubscribe.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/media/zlm/ZlmHttpHookSubscribe.java
@@ -98,7 +98,10 @@
            if (!CollectionUtils.isEmpty(entriesToRemove)) {
                for (Map.Entry<IHookSubscribe, ZlmHttpHookSubscribe.Event> entry : entriesToRemove) {
                    entries.remove(entry);
                    eventMap.remove(entry.getKey());
                }
                if (eventMap.size() == 0) {
                    allSubscribes.remove(hookSubscribe.getHookType());
                }
            }
@@ -137,7 +140,6 @@
//    @Scheduled(cron="0 0/5 * * * ?")   //每5分钟执行一次
    @Scheduled(fixedRate = 2 * 1000)
    public void execute(){
        System.out.println(allSubscribes.size());
        Instant instant = Instant.now().minusMillis(TimeUnit.MINUTES.toMillis(5));
        int total = 0;
        for (HookType hookType : allSubscribes.keySet()) {