@@ -30,12 +30,13 @@ import (
3030 "sync/atomic"
3131 "time"
3232
33+ "github.com/openziti/sdk-golang/inspect"
34+ "github.com/openziti/sdk-golang/xgress"
35+
3336 "github.com/michaelquigley/pfxlog"
3437 "github.com/openziti/channel/v4"
3538 "github.com/openziti/edge-api/rest_model"
3639 "github.com/openziti/foundation/v2/info"
37- "github.com/openziti/sdk-golang/inspect"
38- "github.com/openziti/sdk-golang/xgress"
3940 "github.com/openziti/sdk-golang/ziti/edge"
4041 "github.com/openziti/secretstream"
4142 "github.com/openziti/secretstream/kx"
@@ -62,16 +63,16 @@ var _ edge.Conn = &edgeConn{}
6263// - Manages connection lifecycle from establishment to termination
6364//
6465// Message Flow:
65- // 1. Remote peer sends data → Edge router → msgMux routes to this edgeConn.Accept()
66- // 2. edgeConn.Accept() processes message based on content type (data, state, ack, etc.)
67- // 3. Application reads data via Read() method from internal buffer
68- // 4. Application writes data via Write() method, which sends to edge router
66+ // 1. Remote peer sends data → Edge router → msgMux routes to this edgeConn.Accept()
67+ // 2. edgeConn.Accept() processes message based on content type (data, state, ack, etc.)
68+ // 3. Application reads data via Read() method from internal buffer
69+ // 4. Application writes data via Write() method, which sends to edge router
6970//
7071// Lifecycle:
71- // 1. Created during connection establishment (dial or accept)
72- // 2. Added to msgMux for message routing
73- // 3. Handles session until Close() or remote disconnect
74- // 4. Removed from msgMux and cleaned up
72+ // 1. Created during connection establishment (dial or accept)
73+ // 2. Added to msgMux for message routing
74+ // 3. Handles session until Close() or remote disconnect
75+ // 4. Removed from msgMux and cleaned up
7576//
7677// Thread Safety: All methods are safe for concurrent use.
7778type edgeConn struct {
@@ -316,7 +317,7 @@ func (conn *edgeConn) Accept(msg *channel.Message) {
316317 }
317318 // routing is not accepting more data, so we need to close the send buffer
318319 if conn .xgCircuit != nil {
319- conn .xgCircuit .xg .CloseSendBuffer ()
320+ go conn .xgCircuit .xg .CloseSendBuffer ()
320321 }
321322 conn .sentFIN .Store (true ) // if we're not closing until all reads are done, at least prevent more writes
322323
0 commit comments