소스 검색

[minor] pop socket timeout

version-14
Anand Doshi 11 년 전
부모
커밋
148c5d8891
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. +3
    -0
      webnotes/utils/email_lib/receive.py

+ 3
- 0
webnotes/utils/email_lib/receive.py 파일 보기

@@ -243,6 +243,9 @@ class TimerMixin(object):
self.timeout = kwargs.pop('timeout', 0.0) self.timeout = kwargs.pop('timeout', 0.0)
self.elapsed_time = 0.0 self.elapsed_time = 0.0
self._super.__init__(self, *args, **kwargs) self._super.__init__(self, *args, **kwargs)
if self.timeout:
# set per operation timeout to one-fifth of total pop timeout
self.sock.settimeout(self.timeout / 5.0)
def _getline(self, *args, **kwargs): def _getline(self, *args, **kwargs):
start_time = time.time() start_time = time.time()


불러오는 중...
취소
저장