projects
/
angular-mojolicious.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00aee21
)
silently skip empty chunks
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 7 Dec 2010 18:36:59 +0000
(19:36 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 7 Dec 2010 18:36:59 +0000
(19:36 +0100)
couchdb-trigger.pl
patch
|
blob
|
history
diff --git
a/couchdb-trigger.pl
b/couchdb-trigger.pl
index
873beee
..
77fa41c
100755
(executable)
--- a/
couchdb-trigger.pl
+++ b/
couchdb-trigger.pl
@@
-46,12
+46,9
@@
while( ! $error ) {
$tx->res->body(sub{
my ( $content, $body ) = @_;
- debug 'BODY' => $body;
+ return if length($body) == 0; # empty chunk, heartbeat?
- if ( length($body) == 0 ) {
- warn "# empty chunk, heartbeat?\n";
- return;
- }
+ debug 'BODY' => $body;
foreach ( split(/\r?\n/, $body) ) { # we can get multiple documents in one chunk