ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/connection.C
(Generate patch)

Comparing gvpe/src/connection.C (file contents):
Revision 1.82 by pcg, Fri Aug 15 18:35:24 2008 UTC vs.
Revision 1.83 by pcg, Mon Sep 1 05:31:29 2008 UTC

1307} 1307}
1308 1308
1309inline void 1309inline void
1310connection::keepalive_cb (ev::timer &w, int revents) 1310connection::keepalive_cb (ev::timer &w, int revents)
1311{ 1311{
1312 if (ev_now () >= last_activity + ::conf.keepalive + 30) 1312 if (ev_now () >= last_activity + ::conf.keepalive + 15)
1313 { 1313 {
1314 reset_connection (); 1314 reset_connection ();
1315 establish_connection (); 1315 establish_connection ();
1316 } 1316 }
1317 else if (ev_now () < last_activity + ::conf.keepalive) 1317 else if (ev_now () < last_activity + ::conf.keepalive)
1318 w.start (last_activity + ::conf.keepalive - ev::now ()); 1318 w.start (last_activity + ::conf.keepalive - ev::now ());
1319 else if (conf->connectmode != conf_node::C_ONDEMAND 1319 else if (conf->connectmode != conf_node::C_ONDEMAND
1320 || THISNODE->connectmode != conf_node::C_ONDEMAND) 1320 || THISNODE->connectmode != conf_node::C_ONDEMAND)
1321 { 1321 {
1322 send_ping (si); 1322 send_ping (si);
1323 w.start (5); 1323 w.start (3);
1324 } 1324 }
1325 else if (ev_now () < last_activity + ::conf.keepalive + 10) 1325 else if (ev_now () < last_activity + ::conf.keepalive + 10)
1326 // hold ondemand connections implicitly a few seconds longer 1326 // hold ondemand connections implicitly a few seconds longer
1327 // should delete octx, though, or something like that ;) 1327 // should delete octx, though, or something like that ;)
1328 w.start (last_activity + ::conf.keepalive + 10 - ev::now ()); 1328 w.start (last_activity + ::conf.keepalive + 10 - ev::now ());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines