---
title: betterPathUpdateHandler
framework: network
role: symbol
role_heading: Instance Property
path: network/nwconnection/betterpathupdatehandler
---

# betterPathUpdateHandler

A handler that receives updates when an alternative network path is preferred over the current path.

## Declaration

```swift
@preconcurrency final var betterPathUpdateHandler: (@Sendable (Bool) -> Void)? { get set }
```

## Discussion

Discussion Better path events are an indication that a more preferable network path is available. If you can migrate your work to a new connection, try establishing a new connection. Once that new connection is ready, cancel the original connection.

## See Also

### Handling Path Updates

- [currentPath](network/nwconnection/currentpath.md)
- [pathUpdateHandler](network/nwconnection/pathupdatehandler.md)
- [viabilityUpdateHandler](network/nwconnection/viabilityupdatehandler.md)
