Skip to content

Commit 0ba07a5

Browse files
committed
catch UnsatisfiedLinkError when jda nas is enabled on unsupported systems
1 parent 228a063 commit 0ba07a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

LavalinkServer/src/main/java/lavalink/server/config/KoeConfiguration.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ class KoeConfiguration(val serverConfig: ServerConfig) {
4646
bufferSize, UdpQueueFramePollerFactory.DEFAULT_BUFFER_DURATION)
4747
bufferSize = UdpQueueFramePollerFactory.DEFAULT_BUFFER_DURATION
4848
}
49-
setFramePollerFactory(UdpQueueFramePollerFactory(bufferSize, Runtime.getRuntime().availableProcessors()))
49+
try {
50+
setFramePollerFactory(UdpQueueFramePollerFactory(bufferSize, Runtime.getRuntime().availableProcessors()))
51+
} catch (e: UnsatisfiedLinkError) {
52+
log.warn("A minimum of GLIBC 2.25 is required to support native audio sending! "
53+
+ "GC pauses may cause your bot to stutter during playback.")
54+
}
5055
} else {
5156
log.warn("This system and architecture appears to not support native audio sending! "
5257
+ "GC pauses may cause your bot to stutter during playback.")

0 commit comments

Comments
 (0)