---
title: "onPathUpdate(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/networkconnection/onpathupdate(_:)-2uoc8"
---

# onPathUpdate(_:)

Set a closure to be called when the connection’s path has changed, which may be called multiple times until the connection is cancelled.

## Declaration

```swift
@discardableResult final func onPathUpdate(_ handler: @escaping @isolated(any) @Sendable (NetworkConnection<ApplicationProtocol>, NWPath) -> Void) -> Self
```

## Discussion

Discussion This closure will inherit the isolation domain of the caller.
