From: Vsevolod Stakhov Date: Tue, 20 Jul 2010 15:54:34 +0000 (+0400) Subject: * Some optimizations to client library X-Git-Tag: 0.3.1~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a4bce00dc4be27f4418f45c324362d30a6023469;p=rspamd.git * Some optimizations to client library --- diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm index eb92cada4..789b3187d 100644 --- a/perl/lib/Mail/Rspamd/Client.pm +++ b/perl/lib/Mail/Rspamd/Client.pm @@ -856,7 +856,7 @@ sub _do_rspamc_command { my %metrics; my ($in, $res); - my $msgsize = length($msg.$EOL); + my $msgsize = length($msg); local $SIG{PIPE} = 'IGNORE'; @@ -882,7 +882,7 @@ sub _do_rspamc_command { } syswrite $remote, $EOL; - if (! $self->_write_message($remote, $msg, length($msg))) { + if (! $self->_write_message($remote, $msg, $msgsize)) { my %r = ( error => 'error writing message to rspamd', error_code => 502, @@ -891,7 +891,7 @@ sub _do_rspamc_command { return \%r; } - syswrite $remote, $EOL; + #syswrite $remote, $EOL; unless ($self->_get_io_readiness($remote, 0)) { close $remote;