Prevent Send queue overflow

This commit is contained in:
M66B 2022-09-29 21:56:45 +02:00
parent df3c2ea147
commit f86dcc6f78
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ public class Send {
Uri uri = Uri.parse("wss://" + Uri.parse(host).getHost() + "/api/ws");
WebSocket ws = new WebSocketFactory().createSocket(uri.toString(), TIMEOUT);
ws.setFrameQueueSize(100);
Semaphore sem = new Semaphore(0);
List<String> queue = Collections.synchronizedList(new ArrayList<>());