Merge "ref: Remove dead code detected by intellij."
diff --git a/runtime/internal/flow/conn/conn.go b/runtime/internal/flow/conn/conn.go
index 55a8197..bd2d272 100644
--- a/runtime/internal/flow/conn/conn.go
+++ b/runtime/internal/flow/conn/conn.go
@@ -158,6 +158,12 @@
 	if channelTimeout == 0 {
 		channelTimeout = defaultChannelTimeout
 	}
+	// If the conn is being built on an encapsulated flow, we must update the
+	// cancellation of the flow, to ensure that the conn doesn't get killed
+	// when the context passed in is cancelled.
+	if f, ok := conn.(*flw); ok {
+		ctx = f.SetDeadlineContext(ctx, time.Time{})
+	}
 	c := &Conn{
 		mp:                   newMessagePipe(conn),
 		handler:              handler,
diff --git a/runtime/internal/flow/conn/flow.go b/runtime/internal/flow/conn/flow.go
index 60236a6..b827759 100644
--- a/runtime/internal/flow/conn/flow.go
+++ b/runtime/internal/flow/conn/flow.go
@@ -513,7 +513,7 @@
 		delete(f.conn.flows, f.id)
 		f.conn.mu.Unlock()
 		if serr != nil {
-			ctx.Errorf("Could not send close flow message: %v", err)
+			ctx.VI(2).Infof("Could not send close flow message: %v", err)
 		}
 	}
 }