171 def buildProtocol(self, addr): |
171 def buildProtocol(self, addr): |
172 self.resetDelay() |
172 self.resetDelay() |
173 return ReconnectingClientFactory.buildProtocol(self, addr) |
173 return ReconnectingClientFactory.buildProtocol(self, addr) |
174 |
174 |
175 def clientConnectionFailed(self, connector, reason): |
175 def clientConnectionFailed(self, connector, reason): |
176 if self.continueTrying: |
176 print(_("WAMP Client connection failed (%s) .. retrying ..") % |
177 print(_("WAMP Client connection failed (%s) .. retrying ..") % |
177 time.ctime()) |
178 time.ctime()) |
178 super(ReconnectingWampWebSocketClientFactory, |
179 super(ReconnectingWampWebSocketClientFactory, |
179 self).clientConnectionFailed(connector, reason) |
180 self).clientConnectionFailed(connector, reason) |
|
181 else: |
|
182 del connector |
|
183 |
180 |
184 def clientConnectionLost(self, connector, reason): |
181 def clientConnectionLost(self, connector, reason): |
185 if self.continueTrying: |
182 print(_("WAMP Client connection lost (%s) .. retrying ..") % |
186 print(_("WAMP Client connection lost (%s) .. retrying ..") % |
183 time.ctime()) |
187 time.ctime()) |
184 super(ReconnectingWampWebSocketClientFactory, |
188 super(ReconnectingWampWebSocketClientFactory, |
185 self).clientConnectionFailed(connector, reason) |
189 self).clientConnectionFailed(connector, reason) |
|
190 else: |
|
191 del connector |
|
192 |
186 |
193 |
187 |
194 def CheckConfiguration(WampClientConf): |
188 def CheckConfiguration(WampClientConf): |
195 url = WampClientConf["url"] |
189 url = WampClientConf["url"] |
196 if not IsCorrectUri(url): |
190 if not IsCorrectUri(url): |