Skip to content

Commit 2ec55fb

Browse files
committed
Only enforce port-reuse if willing to retry socket initialization
1 parent 77f758f commit 2ec55fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Transport/src/main/java/de/rub/nds/tlsattacker/transport/tcp/ClientTcpTransportHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void initialize() throws IOException {
7171
try {
7272
socket = new Socket();
7373
socket.setReuseAddress(true);
74-
if (srcPort != null) {
74+
if (srcPort != null && retryFailedSocketInitialization) {
7575
socket.bind(new InetSocketAddress(srcPort));
7676
}
7777
socket.connect(new InetSocketAddress(hostname, dstPort), (int) connectionTimeout);

0 commit comments

Comments
 (0)