Permalink
Browse files

Merge pull request #53 from cpisto/master

Proper fix for issue #51
  • Loading branch information...
2 parents fb6e6dd + e3f9b0d commit 92a0d2476a8fd0c3db18140c090725ea73e2b237 @mrjoes committed Jul 8, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 tornadio2/session.py
View
@@ -290,13 +290,15 @@ def connect_endpoint(self, url):
endpoint = urldata.path
- conn_class = self.conn.get_endpoint(endpoint)
- if conn_class is None:
- logging.error('There is no handler for endpoint %s' % endpoint)
- return
+ conn = self.endpoints.get(endpoint, None)
+ if conn is None:
+ conn_class = self.conn.get_endpoint(endpoint)
+ if conn_class is None:
+ logging.error('There is no handler for endpoint %s' % endpoint)
+ return
- conn = conn_class(self, endpoint)
- self.endpoints[endpoint] = conn
+ conn = conn_class(self, endpoint)
+ self.endpoints[endpoint] = conn
self.send_message(proto.connect(endpoint))

0 comments on commit 92a0d24

Please sign in to comment.