@@ -46,7 +46,7 @@ object FS2Channel {
4646 val endpointsMap = startingEndpoints.map(ep => ep.method -> ep).toMap
4747 for {
4848 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
5050 isOpen <- SignallingRef [F ].of(false ).toStream
5151 awaitingSink = isOpen.waitUntil(identity) >> payloadSink(_ : Payload )
5252 impl = new Impl (awaitingSink, ref, isOpen, supervisor)
@@ -61,8 +61,7 @@ object FS2Channel {
6161 private case class State [F [_]](
6262 pendingCalls : Map [CallId , OutputMessage => F [Unit ]],
6363 endpoints : Map [String , Endpoint [F ]],
64- counter : Long ,
65- isOpen : Boolean
64+ counter : Long
6665 ) {
6766 def nextCallId : (State [F ], CallId ) = (this .copy(counter = counter + 1 ), CallId .NumberId (counter))
6867 def storePendingCall (callId : CallId , handle : OutputMessage => F [Unit ]): State [F ] =
@@ -78,9 +77,6 @@ object FS2Channel {
7877 }
7978 def removeEndpoint (method : String ): State [F ] =
8079 copy(endpoints = endpoints.removed(method))
81-
82- def open : State [F ] = copy(isOpen = true )
83- def close : State [F ] = copy(isOpen = false )
8480 }
8581
8682 private class Impl [F [_]](
0 commit comments