Merge release-20210112.0-95-ga90661654 (automated)
This commit is contained in:
commit
fcb89d2d29
|
@ -413,7 +413,10 @@ func (e *endpoint) Connect(addr tcpip.FullAddress) *tcpip.Error {
|
|||
e.RegisterNICID = nic
|
||||
}
|
||||
|
||||
// Save the route we've connected via.
|
||||
if e.route != nil {
|
||||
// If the endpoint was previously connected then release any previous route.
|
||||
e.route.Release()
|
||||
}
|
||||
e.route = route
|
||||
e.connected = true
|
||||
|
||||
|
|
|
@ -1009,6 +1009,11 @@ func (e *endpoint) Connect(addr tcpip.FullAddress) *tcpip.Error {
|
|||
|
||||
e.ID = id
|
||||
e.boundBindToDevice = btd
|
||||
if e.route != nil {
|
||||
// If the endpoint was already connected then make sure we release the
|
||||
// previous route.
|
||||
e.route.Release()
|
||||
}
|
||||
e.route = r
|
||||
e.dstPort = addr.Port
|
||||
e.RegisterNICID = nicID
|
||||
|
|
Loading…
Reference in New Issue