FTP: Avoid ServerSocket leak and cleanup unnecessary code.
Assigning serverSocket to NULL when IOException occurs on
connection socket is not required. Also without a proper
closure for RFCOMMServerSocket before assigning it to NULL
would cause a socket leak.
Change-Id: I99dfcd03f5f73b30fe1763cffcb2a00baed93286
CRs-fixed: 715033
diff --git a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
index 9f37533..f6f6545 100644
--- a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
+++ b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java
@@ -657,8 +657,6 @@
stopped = true; // job done ,close this thread;
} catch (IOException ex) {
stopped = true; //IO exception, close the thread
- //Assign socket handle to null.
- mRfcommServerSocket = null;
if (VERBOSE) Log.v(RTAG, "Accept exception: " + ex.toString());
}
}