mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Bind to both v4 and v6
This commit is contained in:
parent
299b7dec20
commit
378bdea799
1 changed files with 3 additions and 2 deletions
|
@ -2,10 +2,11 @@ use std::{
|
|||
borrow::Cow,
|
||||
collections::BTreeMap,
|
||||
convert::Infallible,
|
||||
net::{Ipv4Addr, SocketAddr, TcpListener},
|
||||
net::{IpAddr, SocketAddr, TcpListener},
|
||||
pin::Pin,
|
||||
sync::Arc,
|
||||
task::{Context, Poll},
|
||||
str::FromStr
|
||||
};
|
||||
|
||||
use aes::cipher::{KeyIvInit, StreamCipher};
|
||||
|
@ -251,7 +252,7 @@ pub struct DiscoveryServer {
|
|||
impl DiscoveryServer {
|
||||
pub fn new(config: Config, port: &mut u16) -> Result<Self, Error> {
|
||||
let (discovery, cred_rx) = RequestHandler::new(config);
|
||||
let address = SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), *port);
|
||||
let address = SocketAddr::new(IpAddr::from_str("::0").unwrap(), *port);
|
||||
|
||||
let (close_tx, close_rx) = oneshot::channel();
|
||||
|
||||
|
|
Loading…
Reference in a new issue