File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public enum Role {
1616 CLIENT , SERVER
1717 }
1818
19- public static int RCVBUF = 64 ;
19+ public static int RCVBUF = 256 ;
2020
2121 public static /*final*/ boolean DEBUG = false ; // must be final in the future in order to take advantage of VM optimization
2222
Original file line number Diff line number Diff line change @@ -293,11 +293,14 @@ public void run() {
293293 }
294294
295295 protected void allocateBuffers ( WebSocket c ) throws InterruptedException {
296+ if ( queuesize .get () >= 2 * decoders .size () + 1 ) {
297+ return ;
298+ }
296299 queuesize .incrementAndGet ();
297300 buffers .put ( createBuffer () );
298301 }
299302 protected void releaseBuffers ( WebSocket c ) throws InterruptedException {
300- queuesize .decrementAndGet ();
303+ // queuesize.decrementAndGet();
301304 // takeBuffer();
302305 }
303306
You can’t perform that action at this time.
0 commit comments