--- old/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java 2017-11-30 04:04:13.836351123 -0800 +++ new/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java 2017-11-30 04:04:13.646334512 -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() + ")"; + } }