Skip to content

Commit a81cf70

Browse files
committed
need to flush non stream frames
1 parent 03abd57 commit a81cf70

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

logging.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ handlers = java.util.logging.ConsoleHandler
33
java.util.logging.ConsoleHandler.level = ALL
44
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
55
java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%4$-7s] [%2$s] %5$s %6$s %n
6-
robaho.net.level=INFO
6+
robaho.net.level=FINEST

src/main/java/robaho/net/httpserver/OpenAddressIntMap.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public synchronized T put(int key, T value) {
7373
return null;
7474
}
7575
entries[sentinel==-1 ? index : sentinel] = new Entry(key, value);
76-
size++; used++;
76+
size++;
77+
if(sentinel!=-1) used++;
7778
return null;
7879
}
7980

src/main/java/robaho/net/httpserver/OpenAddressMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public Object put(String key, Object value) {
6666
}
6767
entries[sentinel==-1 ? index : sentinel] = new Entry(key, value);
6868
size++;
69-
used++;
69+
if(sentinel!=-1) used++;
7070
return null;
7171
}
7272

src/main/java/robaho/net/httpserver/http2/HTTP2Connection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
import java.util.ArrayList;
1111
import java.util.EnumSet;
1212
import java.util.List;
13-
import java.util.concurrent.ConcurrentLinkedQueue;
1413
import java.util.concurrent.Executor;
1514
import java.util.concurrent.atomic.AtomicInteger;
1615
import java.util.concurrent.atomic.AtomicLong;
1716
import java.util.concurrent.locks.Lock;
18-
import java.util.concurrent.locks.LockSupport;
1917
import java.util.concurrent.locks.ReentrantLock;
2018

2119
import com.sun.net.httpserver.Headers;
@@ -140,6 +138,7 @@ public void writeFrame(List<byte[]> partials) throws IOException {
140138
for (var frame : partials) {
141139
outputStream.write(frame);
142140
}
141+
outputStream.flush();
143142
} finally {
144143
unlock();
145144
}

0 commit comments

Comments
 (0)