Added log on connection failure.

master
Nicolas Favre-Felix 14 years ago
parent 72a2cbf73f
commit 7d4de746e2

@ -4,9 +4,12 @@ A very simple web server providing an HTTP interface to Redis. It uses [hiredis]
<pre> <pre>
make clean all make clean all
./webdis & ./webdis &
curl http://127.0.0.1:7379/SET/hello/world curl http://127.0.0.1:7379/SET/hello/world
→ {"SET":[true,"OK"]} → {"SET":[true,"OK"]}
curl http://127.0.0.1:7379/GET/hello curl http://127.0.0.1:7379/GET/hello
→ {"GET":"world"} → {"GET":"world"}

@ -62,6 +62,7 @@ on_timer_reconnect(int fd, short event, void *ctx) {
s->ac->data = s; s->ac->data = s;
if(s->ac->err) { if(s->ac->err) {
slog(s, WEBDIS_ERROR, "Connection failed");
fprintf(stderr, "Error: %s\n", s->ac->errstr); fprintf(stderr, "Error: %s\n", s->ac->errstr);
} }

Loading…
Cancel
Save