Commits

Anonymous committed f31179c

fix block on _recv_task.kill

Comments (0)

Files changed (1)

         if self.stoped:
             return
         self.stoped = True
-        self._recv_task.kill(block=True)
+        self._recv_task.kill(block=0)
         self._recv_task = None
         self.svr.svc_stop(self)
         if 1 and not self.sock_error:
             else:
                 self.send(RT_RESPONSE | DT_PICKLE, index, pickle_dumps(rs, PICKLE_PROTOCOL))
         except Exception as e:
-            log_except('export(%s).%s(%s)', obj_id, name, argkw)
+            log_except('export(%s).%s(%s)', obj_id, name, repr(argkw))
             if dtype & ST_NO_RESULT or self.svr.stoped:
                 return
             self.send(RT_EXCEPTION, index, pickle_dumps(e, PICKLE_PROTOCOL))
     def svc_stop(self, service):
         if service == self.svc:
             self.stop()
+        else:
+            raise ValueError
 
     def execute(self, func, args, kw, **others):
         return self.svc.call(0, 'execute', (func, args, kw),