mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 20:09:58 +00:00
TUN-8748: Migrated datagram V3 flows to use migrated context
Previously, during local flow migration the current connection context was not part of the migration and would cause the flow to still be listening on the connection context of the old connection (before the migration). This meant that if a flow was migrated from connection 0 to connection 1, and connection 0 goes away, the flow would be early terminated incorrectly with the context lifetime of connection 0. The new connection context is provided during migration of a flow and will trigger the observe loop for the flow lifetime to be rebound to this provided context. Closes TUN-8748
This commit is contained in:
@@ -267,7 +267,7 @@ func (c *datagramConn) handleSessionMigration(requestID RequestID, logger *zerol
|
||||
|
||||
// Migrate the session to use this edge connection instead of the currently running one.
|
||||
// We also pass in this connection's logger to override the existing logger for the session.
|
||||
session.Migrate(c, c.logger)
|
||||
session.Migrate(c, c.conn.Context(), c.logger)
|
||||
|
||||
// Send another registration response since the session is already active
|
||||
err = c.SendUDPSessionResponse(requestID, ResponseOk)
|
||||
|
Reference in New Issue
Block a user