mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-16 02:46:08 -04:00
fix sockets never closing bug when client
deletes then queries a collection.
This commit is contained in:
@ -1007,6 +1007,16 @@ bool gotResults ( void *state ) {
|
||||
|
||||
SearchInput *si = &st->m_si;
|
||||
|
||||
// if in streaming mode and we never sent anything and we had
|
||||
// an error, then send that back. we never really entered streaming
|
||||
// mode in that case. this happens when someone deletes a coll
|
||||
// and queries it immediately, then each shard reports ENOCOLLREC.
|
||||
// it was causing a socket to be permanently stuck open.
|
||||
if ( g_errno &&
|
||||
si->m_streamResults &&
|
||||
st->m_socket->m_totalSent == 0 )
|
||||
return sendReply(st,NULL);
|
||||
|
||||
// if already printed from Msg40.cpp, bail out now
|
||||
if ( si->m_streamResults ) {
|
||||
// this will be our final send
|
||||
|
Reference in New Issue
Block a user