File tree 1 file changed +2
-11
lines changed
Tests/AsyncHTTPClientTests
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,11 @@ func getDefaultEventLoopGroup(numberOfThreads: Int) -> EventLoopGroup {
49
49
class TestHTTPDelegate : HTTPClientResponseDelegate {
50
50
typealias Response = Void
51
51
52
- init (
53
- backpressureEventLoop: EventLoop ? = nil ,
54
- stateDidChangeCallback: ( ( State ) -> Void ) ? = nil
55
- ) {
52
+ init ( backpressureEventLoop: EventLoop ? = nil ) {
56
53
self . backpressureEventLoop = backpressureEventLoop
57
- self . stateDidChangeCallback = stateDidChangeCallback
58
54
}
59
55
60
56
var backpressureEventLoop : EventLoop ?
61
- var stateDidChangeCallback : ( ( State ) -> Void ) ?
62
57
63
58
enum State {
64
59
case idle
@@ -68,11 +63,7 @@ class TestHTTPDelegate: HTTPClientResponseDelegate {
68
63
case error( Error )
69
64
}
70
65
71
- var state = State . idle {
72
- didSet {
73
- self . stateDidChangeCallback ? ( self . state)
74
- }
75
- }
66
+ var state = State . idle
76
67
77
68
func didReceiveHead( task: HTTPClient . Task < Response > , _ head: HTTPResponseHead ) -> EventLoopFuture < Void > {
78
69
self . state = . head( head)
You can’t perform that action at this time.
0 commit comments