onCompleted never gets called
<p>By using RxSwift, the purpose of my project is whenever an user types a city in search bar, it will make a call to wrap the current temperature. Currently, I have <code>viewModel</code> which contains</p>

<pre><code>var searchingTerm = Variable&lt;String&gt;("") // this will be binded to search text from view controller
var result: Observable&lt;Weather&gt;!         // this Observable will emit the result based on searchingTerm above.
</code></pre>

<p>In api service, I'm wrapping a network call using RxSwift by following</p>

<pre><code>func openWeatherMapBy(city: String) -&gt; Observable&lt;Weather&gt; {
    let url =   NSURL(string: resourceURL.forecast.path.stringByReplacingOccurrencesOfString("EnterYourCity", withString: city))

    return Observable&lt;WeatherModel&gt;.create({ observer -&gt; Disposable in
        let downloadTask    =   self.session.dataTaskWithURL(url!, completionHandler: { (data, response, error) in
            if let err = error {
                observer.onError(err)
            }
            else {
                do {
                    let json = try NSJSONSerialization.JSONObjectWithData(data!, options: .AllowFragments) as! [String: AnyObject]

                    let weather = Weather(data: json)
                    observer.onNext(weather) 
                    observer.onCompleted()
                }
                catch {

                }

            }
        })

        downloadTask.resume()

        return AnonymousDisposable {
            downloadTask.cancel()
        }
    })
}
</code></pre>

<p>As long as the model created, I'll send it to an observer and complete</p>

<p>At view controller, I'm doing</p>

<pre><code>viewModel.result
            .subscribe( onNext:     { [weak self] model  in
                            self?.weatherModel = model
                            dispatch_async(dispatch_get_main_queue(), { 
                                self?.cityLabel.text        = model.cityName
                                self?.temperatureLabel.text = model.cityTemp?.description
                            })

                        },
                        onError:    { (error) in
                            print("Error is \(error)")
                        },
                        onCompleted:{
                            print("Complete")
                        }
                      )
                            { print("Dealloc")}
            .addDisposableTo(disposeBag)
    }
</code></pre>

<p>It works as expected, UI is updated and show me what I want. However, I have just realized that <code>onCompleted</code> never gets called. I assume if I do everything right, I must have it printed out.</p>

<p>Any ideas about this issue. All comments are welcomed here.</p>