diff --git a/pink/include/pink_conn.h b/pink/include/pink_conn.h index 5f2aa936..6fc53348 100644 --- a/pink/include/pink_conn.h +++ b/pink/include/pink_conn.h @@ -81,6 +81,7 @@ class PinkConn : public std::enable_shared_from_this { } bool IsClose() { return close_; } + // This can be used by the application void SetClose(bool close) { close_ = close; } void set_last_interaction(const struct timeval &now) { diff --git a/pink/src/pink_conn.cc b/pink/src/pink_conn.cc index 02b6d82d..b9437cd5 100644 --- a/pink/src/pink_conn.cc +++ b/pink/src/pink_conn.cc @@ -20,6 +20,7 @@ PinkConn::PinkConn(const int fd, : fd_(fd), ip_port_(ip_port), is_reply_(false), + close_(false), #ifdef __ENABLE_SSL ssl_(nullptr), #endif