Stop apparent error from remote server when read-only client disconnects
commitf2b7b204a22de3f12445c237c8bd399d31b0e39b
authorOlly Betts <olly@survex.com>
Fri, 6 Nov 2015 06:29:45 +0000 (6 19:29 +1300)
committerOlly Betts <olly@survex.com>
Sat, 21 Nov 2015 05:22:07 +0000 (21 18:22 +1300)
tree419c8952cdf5fb8f364533c76c0981cecbef8c04
parentbb0539dccdc4daacbed350694e00a350458e2ed7
Stop apparent error from remote server when read-only client disconnects

A read-only client just closes the connection when done, but the server
reports "Got exception NetworkError: Received EOF", which reads like
there was a problem.

If the server gets EOF when waiting for a new command, we now just
say "Connection closed", while EOF in other circumstances is now
reported more clearly as "Connection closed unexpectedly".

Possibly fixes #654, reported by German M. Bravo.

(cherry picked from commit bcf9b05336b9ea0a53158d678c0a8084ca42e123)
xapian-core/api/replication.cc
xapian-core/backends/brass/brass_databasereplicator.cc
xapian-core/backends/chert/chert_databasereplicator.cc
xapian-core/backends/flint/flint_databasereplicator.cc
xapian-core/backends/remote/remote-database.cc
xapian-core/common/remoteconnection.h
xapian-core/net/remoteconnection.cc
xapian-core/net/remoteserver.cc
xapian-core/net/tcpserver.cc