574 bounce_sendq(session, reason); |
574 bounce_sendq(session, reason); |
575 elseif session.direction == "incoming" then |
575 elseif session.direction == "incoming" then |
576 incoming_s2s[session] = nil; |
576 incoming_s2s[session] = nil; |
577 end |
577 end |
578 |
578 |
|
579 local event_data = { session = session, reason = reason }; |
|
580 if session.type == "s2sout" then |
|
581 prosody.events.fire_event("s2sout-destroyed", event_data); |
|
582 if hosts[session.from_host] then |
|
583 hosts[session.from_host].events.fire_event("s2sout-destroyed", event_data); |
|
584 end |
|
585 else |
|
586 prosody.events.fire_event("s2sin-destroyed", event_data); |
|
587 if hosts[session.to_host] then |
|
588 hosts[session.to_host].events.fire_event("s2sin-destroyed", event_data); |
|
589 end |
|
590 end |
|
591 |
579 retire_session(session); -- Clean session until it is GC'd |
592 retire_session(session); -- Clean session until it is GC'd |
580 end |
593 end |
581 |
594 |
582 return _M; |
595 return _M; |