File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 10
10
"""
11
11
from __future__ import absolute_import
12
12
13
+ import errno
13
14
import kombu
14
15
import logging
15
16
import socket
24
25
from billiard .exceptions import RestartFreqExceeded
25
26
from kombu .common import QoS , ignore_errors
26
27
from kombu .syn import _detect_environment
28
+ from kombu .utils .compat import get_errno
27
29
from kombu .utils .encoding import safe_repr , bytes_t
28
30
from kombu .utils .limits import TokenBucket
29
31
@@ -228,7 +230,9 @@ def start(self):
228
230
maybe_shutdown ()
229
231
try :
230
232
ns .start (self )
231
- except self .connection_errors :
233
+ except self .connection_errors as exc :
234
+ if isinstance (exc , OSError ) and get_errno (exc ) == errno .EMFILE :
235
+ raise # Too many open files
232
236
maybe_shutdown ()
233
237
try :
234
238
self ._restart_state .step ()
You can’t perform that action at this time.
0 commit comments