File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ public struct MessageFrameWSHandler: WSHandler {
105105 framesOut. yield ( frame)
106106 }
107107 }
108+ framesOut. finish ( throwing: nil )
108109 } catch FrameError . closed {
109110 framesOut. yield ( . close( message: " Goodbye " ) )
110111 framesOut. finish ( throwing: nil )
Original file line number Diff line number Diff line change @@ -116,6 +116,15 @@ final class WSHandlerTests: XCTestCase {
116116 )
117117 }
118118
119+ func testResponseFramesEnds( ) async throws {
120+ let handler = MessageFrameWSHandler . make ( )
121+ let frames = try await handler. makeFrames ( for: [ . ping] )
122+
123+ await AsyncAssertEqual (
124+ try await frames. collectAll ( ) ,
125+ [ . pong]
126+ )
127+ }
119128}
120129
121130private extension MessageFrameWSHandler {
You can’t perform that action at this time.
0 commit comments