diff --git a/src/baseclient.cc b/src/baseclient.cc index 39da2f80..3949098b 100644 --- a/src/baseclient.cc +++ b/src/baseclient.cc @@ -1055,8 +1055,8 @@ minio::s3::BaseClient::ListenBucketNotification( auto func = args.func; req.datafunc = [&func = func, &data = data](http::DataFunctionArgs args) -> bool { + data += args.datachunk; while (true) { - data += args.datachunk; size_t pos = data.find('\n'); if (pos == std::string::npos) return true; std::string line = data.substr(0, pos);