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 {
105
105
framesOut. yield ( frame)
106
106
}
107
107
}
108
+ framesOut. finish ( throwing: nil )
108
109
} catch FrameError . closed {
109
110
framesOut. yield ( . close( message: " Goodbye " ) )
110
111
framesOut. finish ( throwing: nil )
Original file line number Diff line number Diff line change @@ -116,6 +116,15 @@ final class WSHandlerTests: XCTestCase {
116
116
)
117
117
}
118
118
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
+ }
119
128
}
120
129
121
130
private extension MessageFrameWSHandler {
You can’t perform that action at this time.
0 commit comments