Chiang97912 / bet365.com

The scraper of bet365.com
MIT License
113 stars 47 forks source link

How to speed up reconnection #13

Open 286844626 opened 3 years ago

286844626 commented 3 years ago

`class MyFactory(WebSocketClientFactory, ReconnectingClientFactory):

def clientConnectionFailed(self, connector, reason):
    print('failed retry!')
    self.retry(connector)

def clientConnectionLost(self, connector, reason):
    self.maxDelay = 10
    print('lost retry!')
    self.retry(connector)

`