Skip to content

Commit 038f800

Browse files
committed
Minor
1 parent 0f3581a commit 038f800

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

core/src/main/java/xyz/gianlu/librespot/core/ZeroconfAuthenticator.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import org.apache.log4j.Logger;
88
import org.jetbrains.annotations.NotNull;
99
import org.xbill.DNS.Name;
10-
import xyz.gianlu.librespot.common.Utils;
1110
import xyz.gianlu.librespot.Version;
12-
import xyz.gianlu.librespot.crypto.DiffieHellman;
11+
import xyz.gianlu.librespot.common.Utils;
1312
import xyz.gianlu.librespot.common.proto.Authentication;
13+
import xyz.gianlu.librespot.crypto.DiffieHellman;
1414

1515
import javax.crypto.Cipher;
1616
import javax.crypto.Mac;
@@ -71,8 +71,7 @@ public class ZeroconfAuthenticator implements Closeable {
7171
this.mDnsService = new MulticastDNSService();
7272

7373
int port = session.random.nextInt((MAX_PORT - MIN_PORT) + 1) + MIN_PORT;
74-
this.runner = new HttpRunner(port);
75-
new Thread(runner).start();
74+
new Thread(this.runner = new HttpRunner(port)).start();
7675

7776
ServiceInstance service = new ServiceInstance(new ServiceName("librespot._spotify-connect._tcp.local."), 0, 0, port, Name.fromString("local."), new InetAddress[]{InetAddress.getLocalHost()}, "VERSION=1.0", "CPath=/");
7877
spotifyConnectService = mDnsService.register(service);
@@ -201,7 +200,7 @@ private class HttpRunner implements Runnable, Closeable {
201200

202201
HttpRunner(int port) throws IOException {
203202
serverSocket = new ServerSocket(port);
204-
LOGGER.info(String.format("HTTP server started successfully on port %d!", port));
203+
LOGGER.info(String.format("Zeroconf HTTP server started successfully on port %d!", port));
205204
}
206205

207206
@Override

0 commit comments

Comments
 (0)