mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #47380 from gtmanfred/2017.7
add io_loop handling to runtests engine
This commit is contained in:
commit
9b59b991c2
@ -21,6 +21,7 @@ import logging
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.event
|
||||
import salt.utils.async
|
||||
|
||||
# Import 3rd-party libs
|
||||
from tornado import gen
|
||||
@ -69,10 +70,10 @@ class PyTestEngine(object):
|
||||
self.sock.bind(('localhost', port))
|
||||
# become a server socket
|
||||
self.sock.listen(5)
|
||||
with salt.utils.async.current_ioloop(self.io_loop):
|
||||
netutil.add_accept_handler(
|
||||
self.sock,
|
||||
self.handle_connection,
|
||||
io_loop=self.io_loop,
|
||||
)
|
||||
|
||||
def handle_connection(self, connection, address):
|
||||
|
Loading…
Reference in New Issue
Block a user