|
7 | 7 | import org.apache.log4j.Logger; |
8 | 8 | import org.jetbrains.annotations.NotNull; |
9 | 9 | import org.xbill.DNS.Name; |
10 | | -import xyz.gianlu.librespot.common.Utils; |
11 | 10 | import xyz.gianlu.librespot.Version; |
12 | | -import xyz.gianlu.librespot.crypto.DiffieHellman; |
| 11 | +import xyz.gianlu.librespot.common.Utils; |
13 | 12 | import xyz.gianlu.librespot.common.proto.Authentication; |
| 13 | +import xyz.gianlu.librespot.crypto.DiffieHellman; |
14 | 14 |
|
15 | 15 | import javax.crypto.Cipher; |
16 | 16 | import javax.crypto.Mac; |
@@ -71,8 +71,7 @@ public class ZeroconfAuthenticator implements Closeable { |
71 | 71 | this.mDnsService = new MulticastDNSService(); |
72 | 72 |
|
73 | 73 | 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(); |
76 | 75 |
|
77 | 76 | 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=/"); |
78 | 77 | spotifyConnectService = mDnsService.register(service); |
@@ -201,7 +200,7 @@ private class HttpRunner implements Runnable, Closeable { |
201 | 200 |
|
202 | 201 | HttpRunner(int port) throws IOException { |
203 | 202 | 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)); |
205 | 204 | } |
206 | 205 |
|
207 | 206 | @Override |
|
0 commit comments