Index: src/mlx/fsuipc.py
===================================================================
--- src/mlx/fsuipc.py	(revision 790)
+++ src/mlx/fsuipc.py	(revision 793)
@@ -118,5 +118,5 @@
 
     @staticmethod
-    def _performRead(data, callback, extra, validator):
+    def _performRead(data, callback, extra, validator, unimportant = False):
         """Perform a read request.
 
@@ -130,16 +130,30 @@
         attemptsLeft = Handler.NUM_READATTEMPTS
         while attemptsLeft>0:
-            values = pyuipc.read(data)
-            if validator is None or \
-               Handler._callSafe(lambda: validator(values, extra)):
+            exception = None
+            try:
+                values = pyuipc.read(data)
+            except TypeError, e:
+                exception = e
+
+            failed = True
+            if (exception is None or unimportant) and \
+               (validator is None or \
+                Handler._callSafe(lambda: validator(values, extra))):
                 Handler._callSafe(lambda: callback(values, extra))
+                failed = False
+
+            if exception is not None:
+                raise exception
+
+            if failed:
+                attemptsLeft -= 1
+            else:
                 return True
-            else:
-                attemptsLeft -= 1
         return False
 
     class Request(object):
         """A simple, one-shot request."""
-        def __init__(self, forWrite, data, callback, extra, validator = None):
+        def __init__(self, forWrite, data, callback, extra,
+                     validator = None, unimportant = False):
             """Construct the request."""
             self._forWrite = forWrite
@@ -148,4 +162,5 @@
             self._extra = extra
             self._validator = validator
+            self.unimportant = unimportant
 
         def process(self, time):
@@ -156,10 +171,22 @@
             if there is some lower-level communication problem."""
             if self._forWrite:
-                pyuipc.write(self._data)
-                Handler._callSafe(lambda: self._callback(True, self._extra))
+                exception = None
+                try:
+                    pyuipc.write(self._data)
+                except TypeError, e:
+                    exception = e
+
+                if exception is None or self.unimportant:
+                    Handler._callSafe(lambda: self._callback(True,
+                                                             self._extra))
+
+                if exception is not None:
+                    raise exception
+
                 return True
             else:
                 return Handler._performRead(self._data, self._callback,
-                                            self._extra, self._validator)
+                                            self._extra, self._validator,
+                                            self.unimportant)
 
         def fail(self):
@@ -267,5 +294,5 @@
             self._requestCondition.notify()
 
-    def requestWrite(self, data, callback, extra = None):
+    def requestWrite(self, data, callback, extra = None, unimportant = False):
         """Request the writing of some data.
 
@@ -281,5 +308,6 @@
         """
         with self._requestCondition:
-            request = Handler.Request(True, data, callback, extra)
+            request = Handler.Request(True, data, callback, extra,
+                                      unimportant = unimportant)
             #print "fsuipc.Handler.requestWrite", request
             self._requests.append(request)
@@ -451,4 +479,10 @@
                     print "fsuipc.Handler._processRequest: FSUIPC returned invalid data too many times, reconnecting"
                     needReconnect = True
+            except TypeError as e:
+                print "fsuipc.Handler._processRequest: type error: " + \
+                      util.utf2unicode(str(e)) + \
+                      ("." if request.unimportant else
+                       (", reconnecting (attempts=%d)." % (attempts,)))
+                needReconnect = not request.unimportant
             except Exception as e:
                 print "fsuipc.Handler._processRequest: FSUIPC connection failed (" + \
