envoyproxy / java-control-plane

Java implementation of an Envoy gRPC control plane
Apache License 2.0
293 stars 136 forks source link

server: set latestResponse before sending response #71

Closed snowp closed 6 years ago

snowp commented 6 years ago

By setting the latest response prior to sending the response we guarantee that the map is updated by the time the corresponding request arrives. This ensures that the nonce check correctly uses the most recent response.

Fixes #70

snowp commented 6 years ago

@dcrn fyi. This should hopefully solve the issue without additional logging

codecov-io commented 6 years ago

Codecov Report

Merging #71 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #71      +/-   ##
============================================
+ Coverage     95.21%   95.22%   +0.01%     
  Complexity      112      112              
============================================
  Files            12       12              
  Lines           439      440       +1     
  Branches         38       38              
============================================
+ Hits            418      419       +1     
  Misses           14       14              
  Partials          7        7
Impacted Files Coverage Δ Complexity Δ
...nvoyproxy/controlplane/server/DiscoveryServer.java 97.72% <100%> (+0.02%) 9 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4622181...0dee781. Read the comment docs.

joeyb commented 6 years ago

After merging this, I'll go ahead and push out a new release with these changes.

dcrn commented 6 years ago

Thanks @snowp !