Fixed bug where client was being closed before msearch request sent