mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-15 19:13:18 +00:00
Fix #1488 - properly set non-blocking flags on accepted connections
This commit is contained in:
1 parent
02cabcc0ec
commit
37cb51ee94
5 files changed
+25
-25
No files matched your search
+2
-2
@@ -60,8 +60,8 @@ size_t mg_iobuf_add(struct mg_iobuf *io, size_t ofs, const void *buf,
|
||||
size_t mg_iobuf_del(struct mg_iobuf *io, size_t ofs, size_t len) {
|
||||
if (ofs > io->len) ofs = io->len;
|
||||
if (ofs + len > io->len) len = io->len - ofs;
|
||||
memmove(io->buf + ofs, io->buf + ofs + len, io->len - ofs - len);
|
||||
zeromem(io->buf + io->len - len, len);
|
||||
if (io->buf) memmove(io->buf + ofs, io->buf + ofs + len, io->len - ofs - len);
|
||||
if (io->buf) zeromem(io->buf + io->len - len, len);
|
||||
io->len -= len;
|
||||
return len;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user