Skip to content
Permalink
Browse files
Fix #524, http interface is not working in OSX
  • Loading branch information
klirichek committed Dec 14, 2018
1 parent f1cde97 commit 2b219e1a32791e7740bb210b7d408f96abc6374f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/searchd.cpp
@@ -22507,7 +22507,7 @@ int NetStateCommon_t::NetManageSocket ( bool bWrite, bool bAfterWrite )
// if there was eof, we're done
// but need to make sure that poll loop passed at least once,
// ie write-read pattern should failed only this way write-poll-read
if ( !bWrite && iRes==0 && !bAfterWrite )
if ( !bWrite && iRes==0 && m_iLeft!=0 && !bAfterWrite ) // request to read 0 raise error on Linux, but not on Mac
{
sphLogDebugv ( "read zero bytes, shutting down socket, sock=%d", m_iClientSock );
sphSockSetErrno ( ESHUTDOWN );

0 comments on commit 2b219e1

Please sign in to comment.