Merge "MTP: Clean up MtpServer initialization and threading:"
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 9085f10..4047e2e 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -237,6 +237,8 @@
 
     if (mSessionOpen)
         mDatabase->sessionEnded();
+    close(fd);
+    mFD = -1;
 }
 
 void MtpServer::sendObjectAdded(MtpObjectHandle handle) {