dont send exception msg to all serach requests when the server
runs out of memory (send exception resp only in reply to search requests that find a match)
This commit is contained in:
@@ -1582,19 +1582,6 @@ struct client *client
|
||||
unsigned long count;
|
||||
int type;
|
||||
|
||||
/*
|
||||
* set true if max memory block drops below MAX_BLOCK_THRESHOLD
|
||||
*/
|
||||
if(casDontAllowSearchReplies){
|
||||
SEND_LOCK(client);
|
||||
send_err(mp,
|
||||
ECA_ALLOCMEM,
|
||||
client,
|
||||
"Server memory exhausted");
|
||||
SEND_UNLOCK(client);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Exit quickly if channel not on this node */
|
||||
status = db_name_to_addr(
|
||||
mp + 1,
|
||||
@@ -1613,6 +1600,19 @@ struct client *client
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* set true if max memory block drops below MAX_BLOCK_THRESHOLD
|
||||
*/
|
||||
if(casDontAllowSearchReplies){
|
||||
SEND_LOCK(client);
|
||||
send_err(mp,
|
||||
ECA_ALLOCMEM,
|
||||
client,
|
||||
"Server memory exhausted");
|
||||
SEND_UNLOCK(client);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* starting with V4.4 the count field is used (abused)
|
||||
* to store the minor version number of the client.
|
||||
|
||||
Reference in New Issue
Block a user