Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Fix regression in mapping OpenVPN errors (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux authored Jan 5, 2024
1 parent 138f1ca commit a255379
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

- OpenVPN: Bad error mapping. [#404](https://github.com/passepartoutvpn/tunnelkit/pull/404)

## 6.3.1 (2024-01-05)

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ private extension OpenVPNTunnelProvider {
}

func openVPNError(from error: Error) -> TunnelKitOpenVPNError? {
if let specificError = error as? OpenVPNError {
switch specificError.asNativeOpenVPNError ?? specificError {
if let specificError = error.asNativeOpenVPNError ?? error as? OpenVPNError {
switch specificError {
case .negotiationTimeout, .pingTimeout, .staleSession:
return .timeout

Expand Down

0 comments on commit a255379

Please sign in to comment.