for {
select {
case <-ts.close:
return
case <-timer.C:
ts.heartbeat(false)
default:
}
if !scanner.Scan() {
continue
}
https://github.com/g8rswimmer/go-twitter/blob/master/v2/tweet_stream.go#L284
Once scanner.Scan() returns false, it will do so on every subsequent call as well, so if ts.close isn't triggered in the select statement - this loop will just keep spinning without doing anything useful. I don't know the rest of the code well enough to decide what should be done instead of continue here