Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.component.DumpableCollection;
import org.eclipse.jetty.util.component.DumpableMap;
import org.eclipse.jetty.util.thread.AutoLock;
import org.eclipse.jetty.util.thread.Invocable;
import org.eclipse.jetty.util.thread.Scheduler;
Expand All @@ -91,6 +92,8 @@ public abstract class HTTP2Session extends AbstractLifeCycle implements Session,
private static final int MAX_TOTAL_LOCAL_STREAMS = Integer.MAX_VALUE / 2;

private final Map<Integer, HTTP2Stream> streams = new ConcurrentHashMap<>();
private final Map<Integer, Integer> localSettings = new ConcurrentHashMap<>();
private final Map<Integer, Integer> remoteSettings = new ConcurrentHashMap<>();
private final Set<Integer> priorityStreams = ConcurrentHashMap.newKeySet();
private final List<FrameListener> frameListeners = new CopyOnWriteArrayList<>();
private final List<LifeCycleListener> lifeCycleListeners = new CopyOnWriteArrayList<>();
Expand Down Expand Up @@ -445,6 +448,7 @@ public void onSettings(SettingsFrame frame, boolean reply)
return;

Map<Integer, Integer> settings = frame.getSettings();
remoteSettings.putAll(settings);
configure(settings, false);
notifySettings(this, frame);

Expand Down Expand Up @@ -811,6 +815,9 @@ public void succeeded(Stream pushed)
@Override
public void settings(SettingsFrame frame, Callback callback)
{
if (!frame.isReply())
localSettings.putAll(frame.getSettings());

control(null, callback, frame);
}

Expand Down Expand Up @@ -1442,7 +1449,10 @@ protected static boolean isClientStream(int streamId)
@Override
public void dump(Appendable out, String indent) throws IOException
{
Dumpable.dumpObjects(out, indent, this, flowControl, flusher, new DumpableCollection("streams", streams.values()));
DumpableCollection streamsDump = new DumpableCollection("streams", streams.values());
DumpableMap localSettingsDump = new DumpableMap("local settings", localSettings);
DumpableMap remoteSettingsDump = new DumpableMap("remote settings", remoteSettings);
Dumpable.dumpObjects(out, indent, this, flowControl, flusher, streamsDump, localSettingsDump, remoteSettingsDump);
}

@Override
Expand Down