Mercurial > prosody-modules
comparison mod_bidi/mod_bidi.lua @ 894:d066987e00b7
mod_bidi: Lower severity of notice about outgoing stream being replaced by bidi
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 12 Jan 2013 03:49:50 +0100 |
| parents | 602e4c509095 |
| children | 844b6ef5d4c4 |
comparison
equal
deleted
inserted
replaced
| 893:602e4c509095 | 894:d066987e00b7 |
|---|---|
| 29 local bidi_session, remote_host; | 29 local bidi_session, remote_host; |
| 30 origin.log("debug", "Creating bidirectional session wrapper"); | 30 origin.log("debug", "Creating bidirectional session wrapper"); |
| 31 if origin.direction == "incoming" then -- then we create an "outgoing" bidirectional session | 31 if origin.direction == "incoming" then -- then we create an "outgoing" bidirectional session |
| 32 local conflicting_session = hosts[origin.to_host].s2sout[origin.from_host] | 32 local conflicting_session = hosts[origin.to_host].s2sout[origin.from_host] |
| 33 if conflicting_session then | 33 if conflicting_session then |
| 34 conflicting_session.log("warn", "We already have an outgoing connection to %s, closing it...", origin.from_host); | 34 conflicting_session.log("info", "We already have an outgoing connection to %s, closing it...", origin.from_host); |
| 35 conflicting_session:close{ condition = "conflict", text = "Replaced by bidirectional stream" } | 35 conflicting_session:close{ condition = "conflict", text = "Replaced by bidirectional stream" } |
| 36 s2smanager.destroy_session(conflicting_session); | 36 s2smanager.destroy_session(conflicting_session); |
| 37 end | 37 end |
| 38 remote_host = origin.from_host; | 38 remote_host = origin.from_host; |
| 39 bidi_session = s2smanager.new_outgoing(origin.to_host, origin.from_host) | 39 bidi_session = s2smanager.new_outgoing(origin.to_host, origin.from_host) |
