Skip to content

Commit

Permalink
Don't retry on IRE or ITR
Browse files Browse the repository at this point in the history
  • Loading branch information
driftx committed Feb 27, 2010
1 parent 0f1596f commit f6e39f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion telephus/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from twisted.internet import defer, reactor
from twisted.internet.error import UserError
from telephus.cassandra import Cassandra
from telephus.cassandra.ttypes import InvalidRequestException

class ClientBusy(Exception):
pass
Expand Down Expand Up @@ -96,7 +97,8 @@ def clientGone(self, proto):
@defer.inlineCallbacks
def submitRequest(self, proto):
def reqError(err, req, d, r):
if r < 1:
if isinstance(err, InvalidRequestException) or \
isinstance(err, InvalidThriftRequest) or r < 1:
d.errback(err)
self._pending.remove(d)
else:
Expand Down

0 comments on commit f6e39f5

Please sign in to comment.