File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2034,6 +2034,8 @@ export class Accessory extends EventEmitter {
2034
2034
const entries : Set < InterfaceName | IPAddress > = new Set ( Array . isArray ( info . bind ) ? info . bind : [ info . bind ] ) ;
2035
2035
2036
2036
if ( entries . has ( "::" ) ) {
2037
+ serverAddress = "::"
2038
+
2037
2039
entries . delete ( "::" ) ;
2038
2040
if ( entries . size ) {
2039
2041
advertiserAddress = Array . from ( entries ) ;
Original file line number Diff line number Diff line change @@ -307,6 +307,12 @@ export class HAPServer extends EventEmitter {
307
307
}
308
308
309
309
public listen ( port : number = 0 , host ?: string ) : void {
310
+ if ( host === "::" ) {
311
+ // this will workaround "EAFNOSUPPORT: address family not supported" errors
312
+ // on systems where IPv6 is not supported/enabled, we just use the node default then by supplying undefined
313
+ host = undefined
314
+ }
315
+
310
316
this . httpServer . listen ( port , host ) ;
311
317
}
312
318
You can’t perform that action at this time.
0 commit comments