@Nullable
    public UserSession getLocalUserSession(@NotNull Long userId, @NotNull DeviceType deviceType) {
        Validator.notNull(userId, "userId");
        Validator.notNull(deviceType, "deviceType");
        UserSessionsManager userSessionsManager = userIdToSessionsManager.get(userId);
        return userSessionsManager == null
                ? null
                : userSessionsManager.getSession(deviceType);
    }
For the case that the client recovers from UDP to TCP/WebSocket: Return the local session if
the client connects to the machine that owns the existing session; Return a new session and
disconnect the remote session if the existing session is on a different machine.
turms-gateway/src/main/java/im/turms/gateway/domain/session/service/SessionService.java