UDP associations' default timeout to be 15 seconds

ref #262
This commit is contained in:
zonyitoo
2020-05-24 16:22:17 +08:00
parent 1f75f7a6b0
commit 98474e2329
+5 -1
View File
@@ -71,4 +71,8 @@ mod utils;
pub const MAXIMUM_UDP_PAYLOAD_SIZE: usize = 65536;
/// Default association expire time
pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(5 * 60);
///
/// FIXME: It is very hard to decide how long this value should be.
/// For some usecases, clients may open a socket for sending just one packet,
/// which will eventually cause too many *useless* associations are kept in the server.
pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(15);