Skip to content

Commit e3d8095

Browse files
committed
connect: unbreak
1 parent 72c5604 commit e3d8095

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

connect/resident.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,18 +1757,20 @@ func (self *Resident) handleClientForward(path connect.TransferPath, transferFra
17571757
if forward == nil || !forward.UpdateActivity() {
17581758
forward = nextForward()
17591759

1760-
var replacedForward *ResidentForward
1761-
// func() {
1762-
// self.stateLock.Lock()
1763-
// defer self.stateLock.Unlock()
1764-
replacedForward = self.forwards[destinationId]
1765-
self.forwards[destinationId] = forward
1766-
// }()
1767-
if replacedForward != nil {
1768-
replacedForward.Cancel()
1769-
}
1770-
glog.V(1).Infof("[rf]open %s->%s\n", sourceId, destinationId)
1760+
if forward != nil {
1761+
var replacedForward *ResidentForward
1762+
// func() {
1763+
// self.stateLock.Lock()
1764+
// defer self.stateLock.Unlock()
1765+
replacedForward = self.forwards[destinationId]
1766+
self.forwards[destinationId] = forward
1767+
// }()
1768+
if replacedForward != nil {
1769+
replacedForward.Cancel()
1770+
}
1771+
glog.V(1).Infof("[rf]open %s->%s\n", sourceId, destinationId)
17711772

1773+
}
17721774
}
17731775

17741776
return forward

0 commit comments

Comments
 (0)