2 - ignore 1 - transient 0 - report as warning -1 - fatal
| 152 | // 0 - report as warning |
| 153 | // -1 - fatal |
| 154 | TS_INLINE int |
| 155 | accept_error_seriousness(int res) |
| 156 | { |
| 157 | switch (res) { |
| 158 | case -ECONNABORTED: |
| 159 | return 2; |
| 160 | case -EAGAIN: |
| 161 | case -ECONNRESET: // for Linux |
| 162 | case -EPIPE: // also for Linux |
| 163 | return 1; |
| 164 | case -EMFILE: |
| 165 | case -ENOMEM: |
| 166 | #if defined(ENOSR) && !defined(freebsd) |
| 167 | case -ENOSR: |
| 168 | #endif |
| 169 | ink_assert(!"throttling misconfigured: set too high"); |
| 170 | #ifdef ENOBUFS |
| 171 | // fallthrough |
| 172 | case -ENOBUFS: |
| 173 | #endif |
| 174 | #ifdef ENFILE |
| 175 | case -ENFILE: |
| 176 | #endif |
| 177 | return 0; |
| 178 | case -EINTR: |
| 179 | ink_assert(!"should be handled at a lower level"); |
| 180 | return 0; |
| 181 | #if defined(EPROTO) && !defined(freebsd) |
| 182 | case -EPROTO: |
| 183 | #endif |
| 184 | case -EOPNOTSUPP: |
| 185 | case -ENOTSOCK: |
| 186 | case -ENODEV: |
| 187 | case -EBADF: |
| 188 | default: |
| 189 | return -1; |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | TS_INLINE void |
| 194 | check_transient_accept_error(int res) |
no outgoing calls
no test coverage detected