Revision 4f16b4a0

b/daemons/ganeti-confd
33 33
import socket
34 34
import pyinotify
35 35
import time
36
import errno
36 37

  
37 38
from optparse import OptionParser
38 39

  
......
77 78
  # this method is overriding an asyncore.dispatcher method
78 79
  def handle_read(self):
79 80
    try:
80
      payload_in, address = self.recvfrom(4096)
81
      try:
82
        payload_in, address = self.recvfrom(4096)
83
      except socket.error, err:
84
        if err.errno == errno.EINTR:
85
          # we got a signal while trying to read. no need to do anything,
86
          # handle_read will be called again if there is data on the socket.
87
          return
88
        else:
89
          raise
81 90
      ip, port = address
82 91
      payload_out =  self.processor.ExecQuery(payload_in, ip, port)
83 92
      if payload_out is not None:

Also available in: Unified diff