[Bluetooth] Fix the socket callback issue (#709)
authordh79pyun <31202060+dh79pyun@users.noreply.github.com>
Thu, 14 Feb 2019 08:34:49 +0000 (17:34 +0900)
committerGitHub <noreply@github.com>
Thu, 14 Feb 2019 08:34:49 +0000 (17:34 +0900)
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothServerSocket.cs

index 22aadec..4c78def 100644 (file)
@@ -36,10 +36,14 @@ namespace Tizen.Network.Bluetooth
         internal int socketFd;
         private bool disposed = false;
 
-        internal BluetoothServerSocket()
+        internal BluetoothServerSocket(int socketFd)
         {
+            Log.Info (Globals.LogTag, "Constructing server socket");
+
             StaticAcceptStateChanged += OnAcceptStateChanged;
             StaticConnectionRequested += OnConnectionRequested;
+
+            this.socketFd = socketFd;
         }
 
         private void OnConnectionRequested(Object s, SocketConnectionRequestedEventArgs e)
@@ -129,12 +133,6 @@ namespace Tizen.Network.Bluetooth
             }
         }
 
-        internal BluetoothServerSocket(int socketFd)
-        {
-            Log.Info (Globals.LogTag, "Constructing server socket");
-            this.socketFd = socketFd;
-        }
-
         /// <summary>
         /// Starts listening on the passed RFCOMM socket and accepts connection requests.
         /// </summary>