Change the behaviour of send_response in module
This commit is contained in:
parent
283b0d006e
commit
59aff52ce1
1 changed files with 3 additions and 4 deletions
|
|
@ -83,11 +83,10 @@ class ModuleContext:
|
||||||
|
|
||||||
def send_response(server, res):
|
def send_response(server, res):
|
||||||
if server in context.servers:
|
if server in context.servers:
|
||||||
r = res.next_response()
|
if res.server is not None:
|
||||||
if r.server is not None:
|
return context.servers[res.server].send_response(res)
|
||||||
return context.servers[r.server].send_response(r)
|
|
||||||
else:
|
else:
|
||||||
return context.servers[server].send_response(r)
|
return context.servers[server].send_response(res)
|
||||||
else:
|
else:
|
||||||
module.logger.error("Try to send a message to the unknown server: %s", server)
|
module.logger.error("Try to send a message to the unknown server: %s", server)
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue