mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Better coping with timeouts.
This commit is contained in:
parent
a22a515e0f
commit
7ae3064210
2 changed files with 7 additions and 1 deletions
2
html.c
2
html.c
|
@ -458,7 +458,7 @@ d_char *html_entry(snac *snac, d_char *s, char *msg, xs_set *seen, int level)
|
|||
|
||||
if (url != NULL) {
|
||||
xs *s1 = xs_fmt("<p><img src=\"%s\" alt=\"%s\"/></p>\n",
|
||||
url, name == NULL ? "" : name);
|
||||
url, xs_is_null(name) ? "" : name);
|
||||
|
||||
s = xs_str_cat(s, s1);
|
||||
}
|
||||
|
|
6
httpd.c
6
httpd.c
|
@ -106,6 +106,12 @@ void httpd_connection(int rs)
|
|||
|
||||
req = xs_httpd_request(f, &payload, &p_size);
|
||||
|
||||
if (req == NULL) {
|
||||
/* probably because a timeout */
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
|
||||
method = xs_dict_get(req, "method");
|
||||
q_path = xs_dup(xs_dict_get(req, "path"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue