void incref();
void decref();
- int ref();
+ int ref() { lock rl(ref_m_); return refno_; }
int compare(connection *another);
private:
chanmgr *mgr_;
const int fd_;
- bool dead_;
+ bool dead_ = false;
charbuf wpdu_;
charbuf rpdu_;
time_point<steady_clock> create_time_;
- int waiters_;
- int refno_;
+ int waiters_ = 0;
+ int refno_ = 1;
const int lossy_;
mutex m_;