fix the host problem !!

This commit is contained in:
Chayapak 2023-06-24 16:29:11 +07:00
parent 0abd349b7a
commit 32b3ced209

View file

@ -66,10 +66,10 @@ public class VoiceChatPlugin extends Bot.Listener {
final SecretPacket secretPacket = new SecretPacket().fromBytes(buf); final SecretPacket secretPacket = new SecretPacket().fromBytes(buf);
initializationData = new InitializationData(bot.options().host(), secretPacket); initializationData = new InitializationData(bot.session().getHost(), secretPacket);
try { try {
final InetAddress address = InetAddress.getByName(bot.options().host()); final InetAddress address = InetAddress.getByName(bot.session().getHost());
socketAddress = new InetSocketAddress(address, initializationData.serverPort()); socketAddress = new InetSocketAddress(address, initializationData.serverPort());
} catch (UnknownHostException e) { } catch (UnknownHostException e) {
throw new RuntimeException(e); throw new RuntimeException(e);