mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-23 01:18:11 +00:00
webrtc/signalling: We get the address when accepting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1456>
This commit is contained in:
parent
e3190c888a
commit
3cfb28d048
1 changed files with 1 additions and 9 deletions
|
@ -74,17 +74,9 @@ 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