From 759ab44a47772ab3afe656a7f06594bc35323b3f Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 10 Sep 2021 11:13:02 -0700 Subject: [PATCH] Set the App Before Initializing The App Over the Connection... --- applications/application_chain.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/applications/application_chain.go b/applications/application_chain.go index 305ef04..abf944f 100644 --- a/applications/application_chain.go +++ b/applications/application_chain.go @@ -40,13 +40,17 @@ func (appchain *ApplicationChain) NewInstance() tapir.Application { func (appchain *ApplicationChain) Init(connection tapir.Connection) { appchain.TranscriptApp.Init(connection) for i, app := range appchain.apps { + // propagate the transcript to the app app.PropagateTranscript(appchain.transcript) + // apply the app to the connection + connection.SetApp(app) + // initialize the application given the connection app.Init(connection) + // if we hit our guard then carry on, otherwise close... if !connection.HasCapability(appchain.capabilities[i]) { connection.Close() return } - connection.SetApp(app) } }