mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-07 16:01:30 +00:00
Handle MBEDTLS_ERR_NET_CONN_RESET errors
This commit is contained in:
1 parent
0ed64707f3
commit
3ec17c41be
3 files changed
+46
-12
No files matched your search
+10
@@ -88,6 +88,16 @@ bool mg_sock_would_block(void) {
|
||||
;
|
||||
}
|
||||
|
||||
bool mg_sock_conn_reset(void);
|
||||
bool mg_sock_conn_reset(void) {
|
||||
int err = MG_SOCK_ERRNO;
|
||||
#if MG_ARCH == MG_ARCH_WIN32 && MG_ENABLE_WINSOCK
|
||||
return err == WSAECONNRESET;
|
||||
#else
|
||||
return err == EPIPE || err == ECONNRESET;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void iolog(struct mg_connection *c, char *buf, long n, bool r) {
|
||||
if (n == 0) {
|
||||
// Do nothing
|
||||
|
||||
Reference in new issue
Block a user