diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 6da2fdb69..8fea67d75 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -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.