From 6150d254657fa2c855b2c1825257a7210bdb2654 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Wed, 4 Dec 2013 00:36:26 -0300 Subject: move server tests to a higher level of abstraction --- kamon-spray/src/main/scala/spray/can/client/ClientRequestTracing.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kamon-spray/src/main') diff --git a/kamon-spray/src/main/scala/spray/can/client/ClientRequestTracing.scala b/kamon-spray/src/main/scala/spray/can/client/ClientRequestTracing.scala index ab6f1f9c..b081bf00 100644 --- a/kamon-spray/src/main/scala/spray/can/client/ClientRequestTracing.scala +++ b/kamon-spray/src/main/scala/spray/can/client/ClientRequestTracing.scala @@ -39,6 +39,9 @@ class ClientRequestTracing { @After("requestContextCreation(ctx, request)") def afterRequestContextCreation(ctx: ContextAndSegmentCompletionAware, request: HttpRequest): Unit = { + // The RequestContext will be copied when a request needs to be retried but we are only interested in creating the + // completion handle the first time we create one. + // The read to ctx.completionHandle should take care of initializing the aspect timely. if(ctx.completionHandle.isEmpty) { val requestAttributes = Map[String, String]( -- cgit v1.2.3