projects
/
Biblio-RFID.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d2f117
)
wrap whole request in eval so we don't die on RFID errors
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 3 Apr 2014 14:02:34 +0000
(16:02 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 3 Apr 2014 14:02:34 +0000
(16:02 +0200)
scripts/RFID-JSONP-server.pl
patch
|
blob
|
history
diff --git
a/scripts/RFID-JSONP-server.pl
b/scripts/RFID-JSONP-server.pl
index
6867f81
..
5baff85
100755
(executable)
--- a/
scripts/RFID-JSONP-server.pl
+++ b/
scripts/RFID-JSONP-server.pl
@@
-91,6
+91,9
@@
sub http_server {
print "Server $0 ready at $server_url\n";
while (my $client = $server->accept()) {
+
+ eval { # don't die inside here!
+
$client->autoflush(1);
my $request = <$client>;
@@
-195,6
+198,12
@@
sub http_server {
print $client "HTTP/1.0 500 No method\r\n\r\n";
}
close $client;
+
+ }; # end of eval
+ if ( $@ ) {
+ warn "ERROR: $@";
+ }
+
}
die "server died";