Skip to content

Commit 0eff7f8

Browse files
Felix ExnerFelix Exner
authored andcommitted
Only check for program on the first call
This way, when using the program node multiple times in one program, the code is only retrieved once.
1 parent c658737 commit 0eff7f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/fzi/externalcontrol/impl/ExternalControlInstallationNodeContribution.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,10 @@ public void onOk(String value) {
168168
}
169169

170170
public String getUrScriptProgram() {
171-
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
172-
urScriptProgram = sender.sendCommand("request_program\n");
171+
if (urScriptProgram == "") {
172+
RequestProgram sender = new RequestProgram(getHostIP(), getCustomPort());
173+
urScriptProgram = sender.sendCommand("request_program\n");
174+
}
173175
return urScriptProgram;
174176
}
175177
}

0 commit comments

Comments
 (0)