3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-29 23:39:24 +01:00

Use 0 second timeout on SelectHandler's select

We do not need to wait for any timeout period in SelectHandler's
select since IRC.pm's select has a 1 second (by default) timeout.

Removing this unnecessary delay will increase the overall
responsiveness of the bot.
This commit is contained in:
Pragmatic Software 2015-02-15 20:23:07 -08:00
parent 1ffe857ba5
commit 19788eec47

View File

@ -40,7 +40,7 @@ sub remove_reader {
sub do_select {
my ($self) = @_;
my @ready = $self->{select}->can_read(.5);
my @ready = $self->{select}->can_read(0);
foreach my $fh (@ready) {
my $ret = sysread($fh, my $buf, 8192);