velocity forwarded address port default to 0
This commit is contained in:
1 parent
d35461eea1
commit
6c9862cce8
1 file changed
+3
-4
@@ -1,4 +1,4 @@
|
|||||||
use std::net::SocketAddr;
|
use std::net::{IpAddr, SocketAddr};
|
||||||
|
|
||||||
use bytes::{BufMut, BytesMut};
|
use bytes::{BufMut, BytesMut};
|
||||||
use hmac::{Hmac, Mac};
|
use hmac::{Hmac, Mac};
|
||||||
@@ -60,9 +60,8 @@ pub fn receive_plugin_response(
|
|||||||
));
|
));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: dont default to localhost
|
// TODO: no unwrap
|
||||||
let addr: SocketAddr = buf.get_string().unwrap().parse()
|
let addr: SocketAddr = SocketAddr::new(buf.get_string().unwrap().parse::<IpAddr>().unwrap(), 0);
|
||||||
.unwrap_or_else(|_| ([127, 0, 0, 1], 25565).into());
|
|
||||||
|
|
||||||
*client.address.lock() = addr;
|
*client.address.lock() = addr;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user