فهرست منبع

Merge branch 'candidate-7.2.x' into candidate-7.4.x

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 سال پیش
والد
کامیت
bb8e8d3e85
1فایلهای تغییر یافته به همراه19 افزوده شده و 20 حذف شده
  1. 19 20
      fs/dafsserver/dafsserver.cpp

+ 19 - 20
fs/dafsserver/dafsserver.cpp

@@ -4881,6 +4881,7 @@ public:
 
         selecthandler->start();
 
+        Owned<IException> exception;
         for (;;)
         {
             Owned<ISocket> sock;
@@ -4944,9 +4945,13 @@ public:
                     }
                     catch (IException *e)
                     {
-                        EXCLOG(e,"CRemoteFileServer");
-                        e->Release();
-                        continue;
+                        exception.setown(e);
+                    }
+                    if (exception)
+                    {
+                        EXCLOG(exception, "CRemoteFileServer");
+                        exception.clear();
+                        sockavail = false;
                     }
                 }
 
@@ -4975,21 +4980,18 @@ public:
                             sockSSL.setown(ssock.getLink());
                         }
                     }
-                    catch (IJSOCK_Exception *e)
+                    catch (IException *e)
                     {
-                        // accept failed ...
-                        EXCLOG(e,"CRemoteFileServer (secure)");
-                        e->Release();
-                        break;
+                        exception.setown(e);
                     }
-                    catch (IException *e) // IDAFS_Exception also ...
+                    if (exception)
                     {
-                        EXCLOG(e,"CRemoteFileServer1 (secure)");
-                        e->Release();
+                        EXCLOG(exception, "CRemoteFileServer (secure)");
                         cleanupDaFsSocket(sockSSL);
                         sockSSL.clear();
                         cleanupDaFsSocket(ssock);
                         ssock.clear();
+                        exception.clear();
                         securesockavail = false;
                     }
                 }
@@ -5012,21 +5014,18 @@ public:
                             acceptedRSSock.setown(ssock.getLink());
                         }
                     }
-                    catch (IJSOCK_Exception *e)
+                    catch (IException *e)
                     {
-                        // accept failed ...
-                        EXCLOG(e,"CRemoteFileServer (row service)");
-                        e->Release();
-                        break;
+                        exception.setown(e);
                     }
-                    catch (IException *e) // IDAFS_Exception also ...
+                    if (exception)
                     {
-                        EXCLOG(e,"CRemoteFileServer1 (row service)");
-                        e->Release();
+                        EXCLOG(exception, "CRemoteFileServer (row service)");
                         cleanupDaFsSocket(acceptedRSSock);
-                        sockSSL.clear();
+                        acceptedRSSock.clear();
                         cleanupDaFsSocket(ssock);
                         ssock.clear();
+                        exception.clear();
                         rowServiceSockAvail = false;
                     }
                 }