Skip to content

Commit

Permalink
small update
Browse files Browse the repository at this point in the history
  • Loading branch information
akbashev committed Jul 16, 2024
1 parent 5990017 commit 9c4c41f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ actor StreamStorage: Sendable {
try Task.checkCancellation()
print("Recieved a message \(message)")
print("Sending greeting back for \(id)")
switch message.message {
case "connecting": continuation.yield(.init(message: "\(name) connected"))
default:
let greetingText = String(format: message.message, name)
continuation.yield(.init(message: greetingText))
}
let responseText: String =
switch message.message {
case "connecting": "\(name) connected"
default: String(format: message.message, name)
}
continuation.yield(.init(message: responseText))
}
continuation.finish()
}
Expand Down

0 comments on commit 9c4c41f

Please sign in to comment.