Merge pull request #105 from Silent-Client/TEST2

(fix) emote socket
This commit is contained in:
kirillsaint 2024-03-16 00:55:25 +06:00 committed by GitHub
commit a544d86ec2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package net.silentclient.client.emotes.socket;
import io.socket.client.IO; import io.socket.client.IO;
import io.socket.client.Socket; import io.socket.client.Socket;
import io.socket.engineio.client.transports.WebSocket;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.emotes.EmoteManager; import net.silentclient.client.emotes.EmoteManager;
import net.silentclient.client.utils.NotificationUtils; import net.silentclient.client.utils.NotificationUtils;
@ -24,7 +25,10 @@ public class EmoteSocket {
public EmoteSocket() { public EmoteSocket() {
try { try {
this.socket = IO.socket(new URI("https://emotes.silentclient.net:443")); IO.Options options = new IO.Options();
options.transports = new String[] { WebSocket.NAME };
this.socket = IO.socket(new URI("https://emotes.silentclient.net:443"), options);
} catch (Exception err) { } catch (Exception err) {
Client.logger.catching(err); Client.logger.catching(err);
} }