Browse Source

[2225_xfrout] counting closed unixdomain sockets doesn't need to be inside the try block

Naoki Kambe 12 years ago
parent
commit
6ed2eb9103
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bin/xfrout/xfrout.py.in

+ 2 - 2
src/bin/xfrout/xfrout.py.in

@@ -895,9 +895,9 @@ class UnixSockServer(socketserver_mixin.NoPollMixIn,
     def shutdown(self):
         self._write_sock.send(b"shutdown") #terminate the xfrout session thread
         super().shutdown() # call the shutdown() of class socketserver_mixin.NoPollMixIn
+        # count closed unixsockets
+        self._counters.inc('socket', 'unixdomain', 'close')
         try:
-            # count closed unixsockets
-            self._counters.inc('socket', 'unixdomain', 'close')
             os.unlink(self._sock_file)
         except Exception as e:
             logger.error(XFROUT_REMOVE_UNIX_SOCKET_FILE_ERROR, self._sock_file, str(e))