Allow a custom heartbeat interval
This commit is contained in:
parent
1e2caf12b8
commit
3b3c35f131
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ async fn handle_conn(peer: SocketAddr, stream: TcpStream) -> tokio_tungstenite::
|
|||
&SocketMessage {
|
||||
op: HELLO,
|
||||
d: MessageData::HELLO {
|
||||
heartbeat_interval: 1000,
|
||||
heartbeat_interval: env::var("HEARTBEAT_INTERVAL").
|
||||
unwrap_or("1".to_string())
|
||||
.parse::<i32>()
|
||||
.unwrap_or(1),
|
||||
nonce
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue