From 8ffaa3f535b8ea07cdbfb7bdfcdf45d6dc53daf9 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Sun, 24 Sep 2023 09:17:25 +0800 Subject: [PATCH] fix doip local singleton --- build.gradle | 6 +++--- src/main/java/org/bdware/sc/boundry/utils/DOIPUtil.java | 4 ++-- src/main/java/org/bdware/sc/server/DoipLocalSingleton.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index e21a840..6ffc161 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ dependencies { implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'com.squareup.okhttp3:okhttp:4.9.1' implementation 'org.bdware.bdcontract:sdk-java:1.0.2' - implementation 'org.bdware.doip:doip-audit-tool:1.3.6' + implementation 'org.bdware.doip:doip-audit-tool:1.3.7' implementation 'org.bdware.doip:doip-sdk:1.4.9' implementation fileTree(dir: 'lib', include: '*.jar') testImplementation 'junit:junit:4.13.2' @@ -70,8 +70,8 @@ jar { // uncomment this when publish, // while develop at local use "false" configurations.runtimeClasspath.filter { - it.getAbsolutePath().contains("/lib/") - // false + // it.getAbsolutePath().contains("/lib/") + false }.collect { it.isDirectory() ? it : zipTree(it) } diff --git a/src/main/java/org/bdware/sc/boundry/utils/DOIPUtil.java b/src/main/java/org/bdware/sc/boundry/utils/DOIPUtil.java index 4a8fbca..9f59d0b 100644 --- a/src/main/java/org/bdware/sc/boundry/utils/DOIPUtil.java +++ b/src/main/java/org/bdware/sc/boundry/utils/DOIPUtil.java @@ -78,7 +78,7 @@ public class DOIPUtil { if (msg != null) { return msg; } else - return DoipMessageFactory.createTimeoutResponse(message.requestID); + return DoipMessageFactory.createTimeoutResponse(message.requestID, "timeout"); } catch (Exception ie) { ie.printStackTrace(); return DoipMessageFactory.createConnectFailedResponse(message.requestID); @@ -219,7 +219,7 @@ public class DOIPUtil { } public static IRPClientWrapper createIrpClient(String uri, String pubkey, String privateKey, - String repoName) { + String repoName) { EndpointConfig config = new EndpointConfig(); config.routerURI = uri; config.repoName = repoName; diff --git a/src/main/java/org/bdware/sc/server/DoipLocalSingleton.java b/src/main/java/org/bdware/sc/server/DoipLocalSingleton.java index 1e71709..d7eca32 100644 --- a/src/main/java/org/bdware/sc/server/DoipLocalSingleton.java +++ b/src/main/java/org/bdware/sc/server/DoipLocalSingleton.java @@ -95,7 +95,7 @@ public class DoipLocalSingleton { DOOPRequestHandler handler = ContractProcess.instance.doopRequestHandler; server.setRequestCallback(handler); if (config != null) - SharableVarManager.initSharableVarManager(info.id, config); + SharableVarManager.initSharableVarManager(info.id, config); } catch (Exception e) { e.printStackTrace(); }