Skip to content

Commit

Permalink
Fix #86 (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanLozano authored May 19, 2021
1 parent 96c4618 commit a2d26b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WebSocketKit/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public final class WebSocket {
case .connectionClose:
if self.waitingForClose {
// peer confirmed close, time to close channel
self.channel.close(mode: .output, promise: nil)
self.channel.close(mode: .all, promise: nil)
} else {
// peer asking for close, confirm and close output side channel
let promise = self.eventLoop.makePromise(of: Void.self)
Expand All @@ -193,7 +193,7 @@ public final class WebSocket {
promise: promise
)
promise.futureResult.whenComplete { _ in
self.channel.close(mode: .output, promise: nil)
self.channel.close(mode: .all, promise: nil)
}
}
case .ping:
Expand Down

0 comments on commit a2d26b3

Please sign in to comment.