Skip to content

Commit 4a436dc

Browse files
committed
Changed L2CAPSocket from Class to Actor
1 parent 7fa6109 commit 4a436dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/BluetoothLinux/L2CAP/L2CAPSocket.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import SystemPackage
1414
import Socket
1515

1616
/// L2CAP Bluetooth socket
17-
public final class L2CAPSocket: Bluetooth.L2CAPSocket {
17+
public actor L2CAPSocket: Bluetooth.L2CAPSocket {
1818

1919
// MARK: - Properties
2020

@@ -25,15 +25,15 @@ public final class L2CAPSocket: Bluetooth.L2CAPSocket {
2525
/// L2CAP Socket address
2626
public let address: BluetoothAddress
2727

28-
public lazy var event: L2CAPSocketEventStream = { [unowned self] in
28+
public nonisolated var event: L2CAPSocketEventStream {
2929
let stream = self.socket.event
3030
var iterator = stream.makeAsyncIterator()
3131
return L2CAPSocketEventStream(unfolding: {
3232
await iterator
3333
.next()
3434
.map { L2CAPSocketEvent($0) }
3535
})
36-
}()
36+
}
3737

3838
// MARK: - Initialization
3939

0 commit comments

Comments
 (0)