Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AirSync.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.5;
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "sameerasw.airsync-mac";
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand Down Expand Up @@ -477,7 +477,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.5;
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "sameerasw.airsync-mac";
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand Down Expand Up @@ -525,7 +525,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.5;
MARKETING_VERSION = 3.1.0;
MARKETING_VERSION = 3.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "sameerasw.airsync-mac";
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand Down
21 changes: 20 additions & 1 deletion airsync-mac/Core/QuickConnect/QuickConnectManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,38 @@ class QuickConnectManager: ObservableObject {
request.httpBody = message.data(using: .utf8)
request.timeoutInterval = 5.0

var success = false

do {
let (_, response) = try await URLSession.shared.data(for: request)

if let httpResponse = response as? HTTPURLResponse {
if httpResponse.statusCode == 200 {
print("[quick-connect] Wake-up request successful - device should reconnect soon")
success = true
} else if httpResponse.statusCode == 502 {
print("[quick-connect] Wake-up request failed with 502 (Bad Gateway). Retrying once...")

// Small delay before retry
try? await Task.sleep(nanoseconds: 500_000_000)

if let (_, secondResponse) = try? await URLSession.shared.data(for: request),
let secondHttpResponse = secondResponse as? HTTPURLResponse,
secondHttpResponse.statusCode == 200 {
print("[quick-connect] Wake-up retry successful")
success = true
} else {
print("[quick-connect] Wake-up retry failed")
}
} else {
print("[quick-connect] Wake-up request failed with status: \(httpResponse.statusCode)")
}
}
} catch {
print("[quick-connect] Failed to send wake-up request: \(error)")

}

if !success {
// Fallback: Try UDP broadcast
await sendUDPWakeUpRequest(to: device, message: message)
}
Expand Down
6 changes: 6 additions & 0 deletions airsync-mac/Core/SentryInitializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ struct SentryInitializer {
options.sendDefaultPii = true

options.beforeSend = { event in
// Ignore transient wake-up failures (often 502/timeout while device is waking up)
if let request = event.request, let url = request.url, url.contains("/wakeup") {
print("[SentryInitializer] Filtering out transient wake-up error for: \(url)")
return nil
}

if let exceptions = event.exceptions,
let firstException = exceptions.first,
firstException.type == "App Hanging" {
Expand Down