Close session for search

Make search non-blocking.