Skip to content

Commit 861f859

Browse files
committed
Fix half close
1 parent 818662b commit 861f859

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ziti/edge/network/conn.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@ func (conn *edgeConn) CloseWrite() error {
108108
headers := channel.Headers{}
109109
headers.PutUint32Header(edge.FlagsHeader, edge.FIN)
110110
_, err := conn.WriteTraced(nil, nil, headers)
111-
return err
112-
}
113111

114-
if conn.xgCircuit != nil {
115-
conn.xgCircuit.xg.CloseRxTimeout()
112+
if conn.xgCircuit != nil {
113+
conn.xgCircuit.xg.CloseRxTimeout()
114+
}
115+
116+
return err
116117
}
117118

118119
return nil

ziti/edge/network/conn_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ func TestReadMultipart(t *testing.T) {
185185
type NoopTestChannel struct {
186186
}
187187

188+
func (ch *NoopTestChannel) CloseNotify() <-chan struct{} {
189+
panic("implement me")
190+
}
191+
188192
func (ch *NoopTestChannel) GetUnderlays() []channel.Underlay {
189193
panic("implement me")
190194
}

0 commit comments

Comments
 (0)