From a4bce00dc4be27f4418f45c324362d30a6023469 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 20 Jul 2010 19:54:34 +0400 Subject: [PATCH] * Some optimizations to client library --- perl/lib/Mail/Rspamd/Client.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5