Skip to content

Commit 330d461

Browse files
committed
fix: skip reloading configuration after already loaded
1 parent cfe79ed commit 330d461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

control/src/main/kotlin/spp/probe/ProbeConfiguration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ object ProbeConfiguration {
4141
rawProperties = mapper.readValue(FileInputStream(localFile), MutableMap::class.java)
4242
as Map<String, Map<String, Any>>?
4343
}
44-
if (ProbeConfiguration::class.java.protectionDomain.codeSource.location == null) {
44+
if (rawProperties == null && ProbeConfiguration::class.java.protectionDomain.codeSource.location == null) {
4545
//ran through SkyWalking
4646
localFile = File(
4747
File(
@@ -66,7 +66,7 @@ object ProbeConfiguration {
6666
rawProperties = mapper.readValue(FileInputStream(localFile), MutableMap::class.java)
6767
as Map<String, Map<String, Any>>?
6868
}
69-
} else {
69+
} else if (rawProperties == null) {
7070
//ran through intellij?
7171
localFile = File(
7272
File(

0 commit comments

Comments
 (0)