Skip to content

Commit

Permalink
If initial advertisement multicast join fails, close the socket (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmurfin authored Jul 30, 2023
1 parent a13ab83 commit 159b1f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/OTPKit/Components/ComponentSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ class ComponentSocket: NSObject, GCDAsyncUdpSocketDelegate {
break
case .multicastv4, .multicastv6:
for group in multicastGroups {
try join(multicastGroup: group)
do {
try join(multicastGroup: group)
} catch {
socket?.close()
throw error
}
}
}

Expand Down

0 comments on commit 159b1f2

Please sign in to comment.