title: how to stop a timer publisher?
body: <p>I have been playing around a timer publisher for a while in playground. below is my code</p>
  
  <pre><code>let timer = Timer
      .publish(every: 1.0, on: .main, in: .common)
  .autoconnect()
  
  var counter = 0
  let subscriber = timer
      .map({ (date) -&gt; Void in
          counter += 1
      })
      .sink { _ in
  
          print("I am printing the counter \(counter)")
  }
  
  if counter &gt; 5 {
      timer.upstream.connect().cancel() //1.nothing happened
      subscriber.cancel() //2. nothing happened too. :(
  }
  </code></pre>
  
  <p>But i could not stop the timer by using both line 1 and line 2.
  What am i actually missing?</p>