Add comment to hackish solution

This commit is contained in:
vrde 2017-02-06 16:21:22 +01:00
parent 5604e32d57
commit 0c8927dbbe
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D

View File

@ -27,9 +27,11 @@ class MongoDBChangeFeed(ChangeFeed):
while True: while True:
try: try:
# XXX: hack to force reconnection, # XXX: hack to force reconnection. Why? Because the cursor
# the correct way to fix this is to manage errors # in `run_changefeed` does not run in the context of a
# for cursors.conn # Connection object, so if the connection is lost we need
# to manually reset the connection to None.
# See #1154
self.connection.connection = None self.connection.connection = None
self.run_changefeed() self.run_changefeed()
break break