Changeset 176:f98da30301ea for wokkel/component.py
- Timestamp:
- Sep 1, 2012, 2:36:39 PM (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/component.py
r169 r176 333 333 destination = JID(stanza['to']) 334 334 335 log.msg("Routing to %s: %r" % (destination.full(), stanza.toXml()))336 335 337 336 if destination.host in self.routes: 337 log.msg("Routing to %s: %r" % (destination.full(), 338 stanza.toXml())) 338 339 self.routes[destination.host].send(stanza) 340 elif None in self.routes: 341 log.msg("Routing to %s (default route): %r" % (destination.full(), 342 stanza.toXml())) 343 self.routes[None].send(stanza) 339 344 else: 340 self.routes[None].send(stanza) 345 log.msg("No route to %s: %r" % (destination.full(), 346 stanza.toXml())) 347 if stanza.getAttribute('type') not in ('result', 'error'): 348 # No route, send back error 349 exc = error.StanzaError('remote-server-timeout', type='wait') 350 exc.code = '504' 351 response = exc.toResponse(stanza) 352 self.route(response) 341 353 342 354
Note: See TracChangeset
for help on using the changeset viewer.