diff options
| author | 2022-09-28 16:27:53 +0200 | |
|---|---|---|
| committer | 2022-09-28 16:27:53 +0200 | |
| commit | 7ae3064210123fe19cb036c7b879418e1262ec2f (patch) | |
| tree | 84455eed7c9e7b4c7b34974924a97f1af4dae681 /httpd.c | |
| parent | More HTML work. (diff) | |
| download | penes-snac2-7ae3064210123fe19cb036c7b879418e1262ec2f.tar.gz penes-snac2-7ae3064210123fe19cb036c7b879418e1262ec2f.tar.xz penes-snac2-7ae3064210123fe19cb036c7b879418e1262ec2f.zip | |
Better coping with timeouts.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -106,6 +106,12 @@ void httpd_connection(int rs) | |||
| 106 | 106 | ||
| 107 | req = xs_httpd_request(f, &payload, &p_size); | 107 | req = xs_httpd_request(f, &payload, &p_size); |
| 108 | 108 | ||
| 109 | if (req == NULL) { | ||
| 110 | /* probably because a timeout */ | ||
| 111 | fclose(f); | ||
| 112 | return; | ||
| 113 | } | ||
| 114 | |||
| 109 | method = xs_dict_get(req, "method"); | 115 | method = xs_dict_get(req, "method"); |
| 110 | q_path = xs_dup(xs_dict_get(req, "path")); | 116 | q_path = xs_dup(xs_dict_get(req, "path")); |
| 111 | 117 | ||