Пример #1
0
 def __ensure_not_closing(self):
     if self._closing:
         raise Unavailable('Closing')
Пример #2
0
 def __ensure_not_closed(self):
     if self._closed:
         raise Unavailable('Closed')
Пример #3
0
 def __ensure_need_reconnect(self):
     self.__ensure_not_closed()
     if not self._need_reconnect:
         raise Unavailable('Give up reconnect')