From 19788eec4748b50a3e68c28c24dbf047fab61e20 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 15 Feb 2015 20:23:07 -0800 Subject: [PATCH] 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. --- PBot/SelectHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/SelectHandler.pm b/PBot/SelectHandler.pm index 8ffb5d8d..624a0aa2 100644 --- a/PBot/SelectHandler.pm +++ b/PBot/SelectHandler.pm @@ -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);