diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..8cc5ad8 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.x86_64-pc-windows-gnu] +rustflags = "-C link-args=-lssp" # Does does compile without this line \ No newline at end of file diff --git a/src/consts.rs b/src/consts.rs index d0b9cfc..fe8da6a 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -2,6 +2,6 @@ pub const VERSION: &str = env!("CARGO_PKG_VERSION"); pub const MOTD: &str = "OPEN BETA (v2)"; /// The time it takes for Spoticord to disconnect when no music is being played -pub const DISCONNECT_TIME: u64 = 10; +pub const DISCONNECT_TIME: u64 = 5 * 60; // pub const MOTD: &str = "some good 'ol music"; diff --git a/src/main.rs b/src/main.rs index 0ba86cd..1e50025 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,14 +97,13 @@ async fn main() { let shard_manager = client.shard_manager.clone(); let cache = client.cache_and_http.cache.clone(); - let mut term: Option>; - #[cfg(unix)] - { - term = Some(Box::new( - tokio::signal::unix::signal(SignalKind::terminate()).unwrap(), - )); - } + let mut term: Option> = Some(Box::new( + tokio::signal::unix::signal(SignalKind::terminate()).unwrap(), + )); + + #[cfg(not(unix))] + let term: Option> = None; // Background tasks tokio::spawn(async move {