Skip to content

Commit

Permalink
wip review
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoughjr committed Aug 29, 2023
1 parent cd7e448 commit 0dd0210
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/WebSocketKit/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,14 @@ public final class WebSocket: Sendable {
fin: Bool = true,
promise: EventLoopPromise<Void>? = nil
) {
if let p = pmce,
p.enabled {
if let p = pmce {
do {
let compressedFrame = try p.compressed(data, fin:fin, opCode: opcode)
self.channel.writeAndFlush(compressedFrame, promise: promise)
}
catch {
logger.error("\(error)")
}
}
else {
let frame = WebSocketFrame(
Expand Down

0 comments on commit 0dd0210

Please sign in to comment.