浏览代码

log old session

zhouhao 5 年之前
父节点
当前提交
501760dce4

+ 1 - 0
jetlinks-standalone/pom.xml

@@ -6,6 +6,7 @@
         <artifactId>jetlinks-community</artifactId>
         <groupId>org.jetlinks.community</groupId>
         <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/configuration/DefaultDeviceSessionManager.java

@@ -271,7 +271,7 @@ public class DefaultDeviceSessionManager implements DeviceSessionManager {
         if (null != old) {
             //1. 可能是多个设备使用了相同的id.
             //2. 可能是同一个设备,注销后立即上线,由于种种原因,先处理了上线后处理了注销逻辑.
-            log.warn("device[{}] session exists,disconnect old session:{}", old.getDeviceId(), session);
+            log.warn("device[{}] session exists,disconnect old session:{}", old.getDeviceId(), old);
             //加入关闭连接队列
             scheduleJobQueue.add(old::close);
         } else {

+ 0 - 18
jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/configuration/IndexPageWebFilter.java

@@ -1,18 +0,0 @@
-package org.jetlinks.community.standalone.configuration;
-
-import org.springframework.stereotype.Component;
-import org.springframework.web.server.ServerWebExchange;
-import org.springframework.web.server.WebFilter;
-import org.springframework.web.server.WebFilterChain;
-import reactor.core.publisher.Mono;
-
-@Component
-public class IndexPageWebFilter implements WebFilter {
-    @Override
-    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
-        if (exchange.getRequest().getURI().getPath().equals("/")) {
-            return chain.filter(exchange.mutate().request(exchange.getRequest().mutate().path("/index.html").build()).build());
-        }
-        return chain.filter(exchange);
-    }
-}