@@ -46,7 +46,7 @@ object FS2Channel {
46
46
val endpointsMap = startingEndpoints.map(ep => ep.method -> ep).toMap
47
47
for {
48
48
supervisor <- Stream .resource(Supervisor [F ])
49
- ref <- Ref [F ].of(State [F ](Map .empty, endpointsMap, 0 , false )).toStream
49
+ ref <- Ref [F ].of(State [F ](Map .empty, endpointsMap, 0 )).toStream
50
50
isOpen <- SignallingRef [F ].of(false ).toStream
51
51
awaitingSink = isOpen.waitUntil(identity) >> payloadSink(_ : Payload )
52
52
impl = new Impl (awaitingSink, ref, isOpen, supervisor)
@@ -61,8 +61,7 @@ object FS2Channel {
61
61
private case class State [F [_]](
62
62
pendingCalls : Map [CallId , OutputMessage => F [Unit ]],
63
63
endpoints : Map [String , Endpoint [F ]],
64
- counter : Long ,
65
- isOpen : Boolean
64
+ counter : Long
66
65
) {
67
66
def nextCallId : (State [F ], CallId ) = (this .copy(counter = counter + 1 ), CallId .NumberId (counter))
68
67
def storePendingCall (callId : CallId , handle : OutputMessage => F [Unit ]): State [F ] =
@@ -78,9 +77,6 @@ object FS2Channel {
78
77
}
79
78
def removeEndpoint (method : String ): State [F ] =
80
79
copy(endpoints = endpoints.removed(method))
81
-
82
- def open : State [F ] = copy(isOpen = true )
83
- def close : State [F ] = copy(isOpen = false )
84
80
}
85
81
86
82
private class Impl [F [_]](
0 commit comments