From c6c1ca92ea2d65278271fcf139c33e7f24f916f4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Jun 2021 00:51:57 +0100 Subject: Support stopping the event stream reading --- lib/input/replStream.cpp | 6 ++++++ lib/input/replStream.h | 1 + 2 files changed, 7 insertions(+) (limited to 'lib/input') diff --git a/lib/input/replStream.cpp b/lib/input/replStream.cpp index c5bc61f..eb6c030 100644 --- a/lib/input/replStream.cpp +++ b/lib/input/replStream.cpp @@ -39,4 +39,10 @@ namespace MyGrate::Input { } } } + + void + ReplicationStream::stopEvents() + { + mariadb_cancel(this); + } } diff --git a/lib/input/replStream.h b/lib/input/replStream.h index dcfee19..40ec390 100644 --- a/lib/input/replStream.h +++ b/lib/input/replStream.h @@ -17,6 +17,7 @@ namespace MyGrate::Input { unsigned short port, uint64_t serverid, std::string filename, uint64_t position); void readEvents(EventHandlerBase &) override; + void stopEvents() override; private: uint64_t serverid; -- cgit v1.2.3