diff -r 89829dd3cc54 -r b1c1b4ef4be2 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java Fri Nov 03 10:01:08 2017 -0700 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java Wed Dec 06 11:11:59 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,13 +24,18 @@ */ package jdk.incubator.http; +import java.lang.System.Logger.Level; import jdk.incubator.http.internal.frame.SettingsFrame; import jdk.incubator.http.internal.frame.WindowUpdateFrame; +import jdk.incubator.http.internal.common.Utils; import java.util.concurrent.atomic.AtomicInteger; abstract class WindowUpdateSender { + final static boolean DEBUG = Utils.DEBUG; + final System.Logger debug = + Utils.getDebugLogger(this::dbgString, DEBUG); final int limit; final Http2Connection connection; @@ -59,6 +64,7 @@ abstract int getStreamId(); void update(int delta) { + debug.log(Level.DEBUG, "update: %d", delta); if (received.addAndGet(delta) > limit) { synchronized (this) { int tosend = received.get(); @@ -71,8 +77,12 @@ } void sendWindowUpdate(int delta) { + debug.log(Level.DEBUG, "sending window update: %d", delta); connection.sendUnorderedFrame(new WindowUpdateFrame(getStreamId(), delta)); } + String dbgString() { + return "WindowUpdateSender(stream: " + getStreamId() + ")"; + } }