Skip to content

Commit 3a6adbb

Browse files
committed
Possibility to override worker thread allocation logic in WebSocketServer
TooTallNate#279
1 parent ef134b5 commit 3a6adbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/java_websocket/server/WebSocketServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public abstract class WebSocketServer extends AbstractWebSocket implements Runna
7373

7474
private final AtomicBoolean isclosed = new AtomicBoolean( false );
7575

76-
private List<WebSocketWorker> decoders;
76+
protected List<WebSocketWorker> decoders;
7777

7878
private List<WebSocketImpl> iqueue;
7979
private BlockingQueue<ByteBuffer> buffers;
@@ -470,7 +470,7 @@ public ByteBuffer createBuffer() {
470470
return ByteBuffer.allocate( WebSocketImpl.RCVBUF );
471471
}
472472

473-
private void queue( WebSocketImpl ws ) throws InterruptedException {
473+
protected void queue( WebSocketImpl ws ) throws InterruptedException {
474474
if( ws.workerThread == null ) {
475475
ws.workerThread = decoders.get( queueinvokes % decoders.size() );
476476
queueinvokes++;

0 commit comments

Comments
 (0)