Skip to content

Commit ad7f7ab

Browse files
committed
Perform some common-subexpression elimination
1 parent bdb26d8 commit ad7f7ab

File tree

1 file changed

+6
-4
lines changed
  • src/main/java/se/uu/it/dtlsfuzzer/components/sul/core

1 file changed

+6
-4
lines changed

src/main/java/se/uu/it/dtlsfuzzer/components/sul/core/TlsSul.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ public void run() {
150150
});
151151
chWaiter.start();
152152
receivedClientHello = false;
153-
if (((TlsSulClientConfig) sulConfig).getClientWait() > 0) {
153+
long clientWait = ((TlsSulClientConfig) sulConfig).getClientWait();
154+
if (clientWait > 0) {
154155
try {
155-
Thread.sleep(((TlsSulClientConfig) sulConfig).getClientWait());
156+
Thread.sleep(clientWait);
156157
} catch (InterruptedException e) {
157158
LOGGER.error("Could not sleep thread");
158159
}
@@ -188,8 +189,9 @@ public void post() {
188189
LOGGER.error("Transport handler is null");
189190
} else {
190191
transportHandler.closeConnection();
191-
if (sulConfig.getStartWait() > 0) {
192-
Thread.sleep(sulConfig.getStartWait());
192+
long startWait = sulConfig.getStartWait();
193+
if (startWait > 0) {
194+
Thread.sleep(startWait);
193195
}
194196
}
195197
} catch (IOException e) {

0 commit comments

Comments
 (0)