- select($readfds=$wantreadfds,'','',undef);
+ if ($keepalive) {
+ $now= now();
+ $thistimeout= $nextsendka-$now;
+ if ($thistimeout < 0) {
+ defined(send L,"\300",0,$rs)
+ or warning("transmit keepalive error: $!");
+ $nextsendka= $now+$keepalive;
+ $thistimeout= $keepalive;
+ }
+ } else {
+ $thistimeout= undef;
+ }
+ select($readfds=$wantreadfds,'','',$thistimeout);