 				}
 				
 				if shouldSubscribe {
-					subscribeToSignalProducer(innerSignalProducer, state, observer, disposable)
+					subscribeToSignalProducer(innerSignalProducer, state)
 				}
 			}, error: { error in
 				sendError(observer, error)

}

/// Subscribes to the given signal producer.
private func subscribeToSignalProducer<T, E>(signalProducer: SignalProducer<T, E>, state: Atomic<ConcatState<T, E>>, observer: Signal<T, E>.Observer, disposable: CompositeDisposable) {
	let serialDisposable = SerialDisposable()
	let serialDisposableCompositeHandle = disposable.addDisposable(serialDisposable)
	state.modify { (var state) in
		state.latestSignalCompleted = false
		return state
	}
	
	serialDisposable.innerDisposable = signalProducer.start(next: { value in
		sendNext(observer, value)
	}, error: { error in
		sendError(observer, error)
	}, completed: {
		var nextSignalProducer: SignalProducer<T, E>?
		var isComplete = false

		}
		
		if let nextSignalProducer = nextSignalProducer {
			subscribeToSignalProducer(nextSignalProducer, state)
		} else if isComplete {
			sendCompleted(state.value.observer)
		}
	})
}

private struct ConcatState<T, E: ErrorType> {
	/// The observer of a started `concat` producer.
	let observer: Signal<T, E>.Observer

	/// The top level disposable of a started `concat` producer.
	let disposable: CompositeDisposable

	init(observer: Signal<T, E>.Observer, disposable: CompositeDisposable) {
		self.observer = observer
		self.disposable = disposable
	}

	/// Whether the signal-of-signals has completed yet.
	var selfCompleted = false
	
