Closed TT6033 closed 3 years ago
... just because it wasn't needed. It is only used in one place, to ensure that handlers are not added after starting connections:
func (r *Consumer) AddConcurrentHandlers(handler Handler, concurrency int) {
if atomic.LoadInt32(&r.connectedFlag) == 1 {
panic("already connected")
}
It is assumed that after Stop()
the process will exit, or will create a new Consumer when needed again.
It is only used twice....because some Strange reason. I think it should be reset when stop the connection
connectedFlag =1 when ConnectToNSQLookupd called why "connectedFlag" not set zero when Stop() called?