Skip to content

Commit

Permalink
Merge pull request #10 from wilsonge/patch-1
Browse files Browse the repository at this point in the history
Handle AssertionErrors from requests better
  • Loading branch information
ajdavis committed Feb 15, 2018
2 parents 35791e0 + 33fa450 commit 3e1ed3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mockupdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,9 @@ def _server_loop(self, client, client_addr):
break
else:
raise
except AssertionError:
# We got bad data. Bail to avoid leaking resources
break

self._log('disconnected: %s:%d' % client_addr)
client.close()
Expand Down

0 comments on commit 3e1ed3e

Please sign in to comment.