ensure we're in the correct state

This commit is contained in:
Omar Polo 2021-01-21 19:46:36 +00:00
parent 0ac2dceccc
commit 06f233ad8a
1 changed files with 3 additions and 0 deletions

View File

@ -340,6 +340,9 @@ send_file(struct pollfd *fds, struct client *c)
{
ssize_t ret, len;
/* ensure the correct state */
c->state = S_SENDING;
len = (c->buf + c->len) - c->i;
while (len > 0) {