File tree Expand file tree Collapse file tree
api/src/main/java/xyz/gianlu/librespot/api/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import io .undertow .server .HttpHandler ;
2222import io .undertow .server .HttpServerExchange ;
2323import io .undertow .util .Headers ;
24+ import org .slf4j .Logger ;
25+ import org .slf4j .LoggerFactory ;
2426import xyz .gianlu .librespot .ZeroconfServer ;
2527import xyz .gianlu .librespot .api .Utils ;
2628import xyz .gianlu .zeroconf .DiscoveredService ;
2729import xyz .gianlu .zeroconf .Zeroconf ;
2830
31+ import java .io .IOException ;
2932import java .util .Deque ;
3033import java .util .Map ;
3134
3235/**
3336 * @author devgianlu
3437 */
3538public final class DiscoveryHandler implements HttpHandler {
39+ private static final Logger LOGGER = LoggerFactory .getLogger (DiscoveryHandler .class );
3640 private final Zeroconf zeroconf ;
3741
3842 public DiscoveryHandler () {
39- zeroconf = new Zeroconf ();
43+ zeroconf = new Zeroconf ()
44+ .setUseIpv4 (true )
45+ .setUseIpv6 (false );
46+
47+ try {
48+ zeroconf .addAllNetworkInterfaces ();
49+ } catch (IOException ex ) {
50+ LOGGER .error ("Failed adding network interfaces for Zeroconf." , ex );
51+ }
4052 }
4153
4254 @ Override
Original file line number Diff line number Diff line change 116116 <dependency >
117117 <groupId >xyz.gianlu.zeroconf</groupId >
118118 <artifactId >zeroconf</artifactId >
119- <version >1.2.1 </version >
119+ <version >1.2.2 </version >
120120 </dependency >
121121
122122 <!-- HTTP -->
You can’t perform that action at this time.
0 commit comments