Ticket #123: xapian-remote-server-timeout.patch

File xapian-remote-server-timeout.patch, 822 bytes (added by Olly Betts, 18 years ago)

Prospective patch to fix timeout handling

  • net/remoteserver.cc

     
    200200                throw Xapian::InvalidArgumentError(errmsg);
    201201            }
    202202            (this->*(dispatch[type]))(message);
     203        } catch (const Xapian::NetworkTimeoutError & e) {
     204            try {
     205                // We've had a timeout, so the client may not be listening, so
     206                // if we can't send the message right away, just exit and the
     207                // client will cope.
     208                RemoteConnection::send_message(REPLY_EXCEPTION, serialise_error(e), OmTime::now());
     209            } catch (...) {
     210            }
     211            // Exit after a timeout.
     212            return;
    203213        } catch (const Xapian::Error &e) {
    204214            // Propagate the exception across the connection, then return to
    205215            // the main message handling loop.