From 0972bce22f2c6e46862d75fc6a22f4642e956e8d Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sat, 29 Feb 2020 15:05:31 -0800 Subject: [PATCH] minor --- src/conn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conn.cpp b/src/conn.cpp index d9da174..5d29d12 100644 --- a/src/conn.cpp +++ b/src/conn.cpp @@ -220,7 +220,7 @@ void ConnBase::bevEventS(struct bufferevent *bev, short events, void *ptr) conn->bevEvent(events); }catch(std::exception& e){ log_crit_printf(connsetup, "%s %s Unhandled error in bev event callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what()); - static_cast(ptr)->cleanup(); + conn->cleanup(); } } @@ -231,7 +231,7 @@ void ConnBase::bevReadS(struct bufferevent *bev, void *ptr) conn->bevRead(); }catch(std::exception& e){ log_crit_printf(connsetup, "%s %s Unhandled error in bev read callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what()); - static_cast(ptr)->cleanup(); + conn->cleanup(); } } @@ -242,7 +242,7 @@ void ConnBase::bevWriteS(struct bufferevent *bev, void *ptr) conn->bevWrite(); }catch(std::exception& e){ log_crit_printf(connsetup, "%s %s Unhandled error in bev write callback: %s\n", conn->peerLabel(), conn->peerName.c_str(), e.what()); - static_cast(ptr)->cleanup(); + conn->cleanup(); } }