From 95051a43084f2e294807c3e12758a379cdf249f7 Mon Sep 17 00:00:00 2001 From: topi314 Date: Sat, 7 Dec 2024 17:37:42 +0100 Subject: [PATCH] kotlin goes brrr --- .../server/config/AudioPlayerConfiguration.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/LavalinkServer/src/main/java/lavalink/server/config/AudioPlayerConfiguration.kt b/LavalinkServer/src/main/java/lavalink/server/config/AudioPlayerConfiguration.kt index 733a86f6..20f78a94 100644 --- a/LavalinkServer/src/main/java/lavalink/server/config/AudioPlayerConfiguration.kt +++ b/LavalinkServer/src/main/java/lavalink/server/config/AudioPlayerConfiguration.kt @@ -56,18 +56,18 @@ class AudioPlayerConfiguration { serverConfig.timeouts?.let { HttpClientTools.setDefaultRequestConfig( RequestConfig.custom() - .setConnectTimeout(serverConfig.timeouts!!.connectTimeoutMs) - .setConnectionRequestTimeout(serverConfig.timeouts!!.connectionRequestTimeoutMs) - .setSocketTimeout(serverConfig.timeouts!!.socketTimeoutMs) + .setConnectTimeout(it.connectTimeoutMs) + .setConnectionRequestTimeout(it.connectionRequestTimeoutMs) + .setSocketTimeout(it.socketTimeoutMs) .setCookieSpec(CookieSpecs.STANDARD) .build() ) HttpClientTools.setNoCookiesRequestConfig( RequestConfig.custom() - .setConnectTimeout(serverConfig.timeouts!!.connectTimeoutMs) - .setConnectionRequestTimeout(serverConfig.timeouts!!.connectionRequestTimeoutMs) - .setSocketTimeout(serverConfig.timeouts!!.socketTimeoutMs) + .setConnectTimeout(it.connectTimeoutMs) + .setConnectionRequestTimeout(it.connectionRequestTimeoutMs) + .setSocketTimeout(it.socketTimeoutMs) .setCookieSpec(CookieSpecs.IGNORE_COOKIES) .build() )