(as opposed to -1, which waits until an event occurs).
So, set the default timeout to -1, and convert ms_tcp_read_timeout
to -1 if it's set at 0.
reader_thread(this), writer_thread(this) {
connection_state->pipe = get();
messenger->timeout = g_conf.ms_tcp_read_timeout * 1000; //convert to ms
+ if (messenger->timeout == 0)
+ messenger->timeout = -1;
}
~Pipe() {
for (map<int, xlist<Pipe *>::item* >::iterator i = queue_items.begin();
<< buf << ':' << serv;
}
-extern int tcp_read(int sd, char *buf, int len, int timeout=0);
+extern int tcp_read(int sd, char *buf, int len, int timeout=-1);
extern int tcp_write(int sd, const char *buf, int len);
inline bool operator==(const sockaddr_in& a, const sockaddr_in& b) {