diff src/goodjava/lucene/backup/BackupIndexWriter.java @ 1509:0ba144491a42

lucene.backup zip
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 May 2020 14:29:33 -0600
parents 86c5e7000ecf
children 31b543826ca9
line wrap: on
line diff
--- a/src/goodjava/lucene/backup/BackupIndexWriter.java	Sat May 16 17:56:02 2020 -0600
+++ b/src/goodjava/lucene/backup/BackupIndexWriter.java	Sun May 17 14:29:33 2020 -0600
@@ -11,7 +11,6 @@
 import java.util.Arrays;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ExecutorService;
-import javax.net.ssl.SSLSocket;
 import org.apache.lucene.search.SortField;
 import goodjava.io.IoUtils;
 import goodjava.rpc.RpcClient;
@@ -121,7 +120,7 @@
 			logMap.put(log.file.getName(),log);
 		}
 		for( String backupDomain : backupDomains ) {
-			RpcClient rpc = rpcClient(backupDomain);
+			RpcClient rpc = BackupServer.rpcClient(backupDomain);
 			RpcCall call = new RpcCall("check",name,logInfo);
 			try {
 				while(true) {
@@ -164,14 +163,4 @@
 		}
 	}
 
-	static RpcClient rpcClient(String backupDomain) throws IOException {
-		Socket socket;
-		if( BackupServer.cipherSuites == null ) {
-			socket = new Socket(backupDomain,BackupServer.port);
-		} else {
-			socket = IoUtils.getSSLSocketFactory().createSocket(backupDomain,BackupServer.port);
-			((SSLSocket)socket).setEnabledCipherSuites(BackupServer.cipherSuites);
-		}
-		return new RpcClient(socket);
-	}
 }