Ticket #123: zero_timeout.patch

File zero_timeout.patch, 972 bytes (added by Mark Hammond, 17 years ago)

patch the allows for no timeouts

  • net/remoteserver.cc

     
    105105                          message_type required_type)
    106106{
    107107    unsigned int type;
    108     type = RemoteConnection::get_message(result, OmTime::now() + timeout);
     108    OmTime end_time;
     109    if (timeout)
     110        end_time = OmTime::now() + timeout;
     111    type = RemoteConnection::get_message(result, end_time);
    109112
    110113    // Handle "shutdown connection" message here.
    111114    if (type == MSG_SHUTDOWN) throw ConnectionClosed();
     
    127130void
    128131RemoteServer::send_message(reply_type type, const string &message)
    129132{
    130     OmTime end_time = OmTime::now() + active_timeout;
     133    OmTime end_time;
     134    if (active_timeout)
     135        end_time = OmTime::now() + active_timeout;
    131136    unsigned char type_as_char = static_cast<unsigned char>(type);
    132137    RemoteConnection::send_message(type_as_char, message, end_time);
    133138}