Merge pull request openziti/fabric#268 from openziti/tidy-close

Close send buffer when unrouted, since sends will no longer work
This commit is contained in:
Paul Lorenz
2021-09-10 12:04:24 -04:00
committed by GitHub
+1
View File
@@ -261,6 +261,7 @@ func (self *Xgress) Unrouted() {
// When we're unrouted, if end of circuit hasn't already arrived, give incoming/queued data
// a chance to outflow before closing
if !self.flags.IsSet(closedFlag) {
self.payloadBuffer.Close()
time.AfterFunc(self.Options.MaxCloseWait, self.Close)
}
}