MOAR TEMPLATE MAGIC
[invirt/third/libt4.git] / rpc / connection.h
index 261cf9f..2a01e46 100644 (file)
@@ -43,7 +43,7 @@ class connection : public aio_callback {
 
         void incref();
         void decref();
-        int ref();
+        int ref() { lock rl(ref_m_); return refno_; }
 
         int compare(connection *another);
     private:
@@ -53,15 +53,15 @@ class connection : public aio_callback {
 
         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_;