From f88f8fdd3eb6f0ae6f37d8f0b486efc01ec0b583 Mon Sep 17 00:00:00 2001 From: Vincent Lohse Date: Tue, 12 Nov 2024 12:48:37 +0000 Subject: [PATCH] FIX: Set "close_" to false by default --- pink/include/pink_conn.h | 1 + pink/src/pink_conn.cc | 1 + 2 files changed, 2 insertions(+) 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