Skip to content

Commit

Permalink
Refactor rtmpConnection to connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Dec 19, 2023
1 parent f29c590 commit 0a4bf37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/RTMP/RTMPStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ open class RTMPStream: IOStream {
/// Sends a message on a published stream to all subscribing clients.
public func send(handlerName: String, arguments: Any?...) {
lockQueue.async {
guard let rtmpConnection = self.connection, self.readyState == .publishing(muxer: self.muxer) else {
guard let connection = self.connection, self.readyState == .publishing(muxer: self.muxer) else {
return
}
let dataWasSent = self.dataTimeStamps[handlerName] == nil ? false : true
Expand All @@ -383,7 +383,7 @@ open class RTMPStream: IOStream {
handlerName: handlerName,
arguments: arguments
))
let length = rtmpConnection.socket?.doOutput(chunk: chunk) ?? 0
let length = connection.socket?.doOutput(chunk: chunk) ?? 0
self.dataTimeStamps[handlerName] = .init()
self.info.byteCount.mutate { $0 += Int64(length) }
}
Expand Down

0 comments on commit 0a4bf37

Please sign in to comment.