mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-11-28 00:35:01 +00:00
fix: return local address for direct WebSocket connections
This commit is contained in:
1 parent
0ccaaf2cf6
commit
423fb71085
2 files changed
+7
-4
No files matched your search
+2
-2
@@ -213,8 +213,8 @@ impl WsFramedStream {
|
||||
match stream {
|
||||
Either::Left(stream) => {
|
||||
// MaybeTlsStream::get_ref() handles Plain, NativeTls and Rustls,
|
||||
// returning the underlying TcpStream for peer_addr().
|
||||
let addr = stream.get_ref().get_ref().peer_addr()?;
|
||||
// returning the underlying TcpStream for local_addr().
|
||||
let addr = stream.get_ref().get_ref().local_addr()?;
|
||||
Ok((Either::Left(stream), addr))
|
||||
}
|
||||
Either::Right((stream, addr)) => Ok((Either::Right(stream), addr)),
|
||||
|
||||
Reference in new issue
Block a user