MCPcopy Create free account
hub / github.com/apache/trafficserver / accept_error_seriousness

Function accept_error_seriousness

src/iocore/net/P_UnixNet.h:154–191  ·  view source on GitHub ↗

2 - ignore 1 - transient 0 - report as warning -1 - fatal

Source from the content-addressed store, hash-verified

152// 0 - report as warning
153// -1 - fatal
154TS_INLINE int
155accept_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
193TS_INLINE void
194check_transient_accept_error(int res)

Callers 2

do_blocking_acceptMethod · 0.85
acceptFastEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected