mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
webrtc/signalling: We get the address when accepting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1412>
This commit is contained in:
parent
63b568f4a0
commit
2d85048925
1 changed files with 1 additions and 10 deletions
|
@ -84,17 +84,8 @@ async fn main() -> Result<(), Error> {
|
||||||
|
|
||||||
info!("Listening on: {}", addr);
|
info!("Listening on: {}", addr);
|
||||||
|
|
||||||
while let Ok((stream, _)) = listener.accept().await {
|
while let Ok((stream, address)) = listener.accept().await {
|
||||||
let mut server_clone = server.clone();
|
let mut server_clone = server.clone();
|
||||||
|
|
||||||
let address = match stream.peer_addr() {
|
|
||||||
Ok(address) => address,
|
|
||||||
Err(err) => {
|
|
||||||
warn!("Connected peer with no address: {}", err);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
info!("Accepting connection from {}", address);
|
info!("Accepting connection from {}", address);
|
||||||
|
|
||||||
if let Some(acceptor) = acceptor.clone() {
|
if let Some(acceptor) = acceptor.clone() {
|
||||||
|
|
Loading…
Reference in a new issue