Tiny improvement [#CLICKHOUSE-3820]

This commit is contained in:
Alexey Milovidov 2018-07-13 20:27:58 +03:00
parent 53f9ae3cf1
commit 215ec2be98

View File

@ -1021,6 +1021,10 @@ void ZooKeeper::receiveEvent()
{ {
tryLogCurrentException(__PRETTY_FUNCTION__); tryLogCurrentException(__PRETTY_FUNCTION__);
/// Unrecoverable. Don't leave incorrect state in memory.
if (!response)
std::terminate();
response->error = ZMARSHALLINGERROR; response->error = ZMARSHALLINGERROR;
if (request_info.callback) if (request_info.callback)
request_info.callback(*response); request_info.callback(*response);