mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 06:48:04 +01:00
Remove unnecessary socket.setReuseAddress() in test extensions
This commit is contained in:
@@ -202,7 +202,6 @@ public class RedisClusterExtension implements BeforeAllCallback, BeforeEachCallb
|
||||
final int maxIterations = 11_000;
|
||||
for (int i = 0; i < maxIterations; i++) {
|
||||
try (final ServerSocket socket = new ServerSocket(0)) {
|
||||
socket.setReuseAddress(false);
|
||||
final int port = socket.getLocalPort();
|
||||
if (port < 55535) {
|
||||
return port;
|
||||
|
||||
@@ -93,7 +93,6 @@ public class RedisServerExtension implements BeforeAllCallback, BeforeEachCallba
|
||||
|
||||
private static int getAvailablePort() throws IOException {
|
||||
try (ServerSocket socket = new ServerSocket(0)) {
|
||||
socket.setReuseAddress(false);
|
||||
return socket.getLocalPort();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user