Ticket #123: zero_timeout.patch
File zero_timeout.patch, 972 bytes (added by , 18 years ago) |
---|
-
net/remoteserver.cc
105 105 message_type required_type) 106 106 { 107 107 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); 109 112 110 113 // Handle "shutdown connection" message here. 111 114 if (type == MSG_SHUTDOWN) throw ConnectionClosed(); … … 127 130 void 128 131 RemoteServer::send_message(reply_type type, const string &message) 129 132 { 130 OmTime end_time = OmTime::now() + active_timeout; 133 OmTime end_time; 134 if (active_timeout) 135 end_time = OmTime::now() + active_timeout; 131 136 unsigned char type_as_char = static_cast<unsigned char>(type); 132 137 RemoteConnection::send_message(type_as_char, message, end_time); 133 138 }