Browse Source

[2025] Reconnect after getting SOA for the actual xfrin

From looking at packet capture, it seems that a close on the socket is
happening after the SOA record is returned. So this patch simply
reconnects after _check_soa_serial(). This fixes the xfrin after notify
issue.
Mukund Sivaraman 13 years ago
parent
commit
1b235c7827
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/bin/xfrin/xfrin.py.in

+ 4 - 0
src/bin/xfrin/xfrin.py.in

@@ -889,6 +889,10 @@ class XfrinConnection(asyncore.dispatcher):
             req_str = 'IXFR' if request_type == RRType.IXFR() else 'AXFR'
             req_str = 'IXFR' if request_type == RRType.IXFR() else 'AXFR'
             if check_soa:
             if check_soa:
                 self._check_soa_serial()
                 self._check_soa_serial()
+                self.close()
+                self.init_socket()
+                if not self.connect_to_master():
+                    raise XfrinException('Unable to reconnect to master')
 
 
             logger.info(XFRIN_XFR_TRANSFER_STARTED, req_str, self.zone_str())
             logger.info(XFRIN_XFR_TRANSFER_STARTED, req_str, self.zone_str())
             self._send_query(self._request_type)
             self._send_query(self._request_type)