X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5a5c578e2e358a121cdb9234a6cb11c4ecfbf323..24bebc0ecf83446c7371eff69042322aab34976a:/rpc/connection.h?ds=sidebyside diff --git a/rpc/connection.h b/rpc/connection.h index 261cf9f..2a01e46 100644 --- a/rpc/connection.h +++ b/rpc/connection.h @@ -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 create_time_; - int waiters_; - int refno_; + int waiters_ = 0; + int refno_ = 1; const int lossy_; mutex m_;