@@ -17,7 +17,6 @@ public class AdbServer : IDisposable
1717 private static string ? FilesDir => AndroidCore . context ? . FilesDir ? . Path ;
1818 private static string ? CacheDir => AndroidCore . context ? . CacheDir ? . Path ;
1919 private static string ? NativeLibsDir => AndroidCore . context . ApplicationInfo ? . NativeLibraryDir ;
20- private CancellationTokenSource ? CancelToken { get ; set ; }
2120 private Process ? ServerProcess { get ; set ; }
2221 public static AdbServer Instance { get ; set ; }
2322
@@ -43,10 +42,6 @@ private void StartServer(string arguments)
4342 {
4443 Thread t = new Thread ( ( ) =>
4544 {
46- // Asserts
47- Debug . Assert ( this . ServerProcess == null ) ;
48- Debug . Assert ( this . CancelToken == null ) ;
49-
5045 // Create and configure the ProcessStartInfo.
5146 var adbInfo = new ProcessStartInfo ( AdbPath , arguments ) ;
5247 adbInfo . WorkingDirectory = FilesDir ;
@@ -64,10 +59,7 @@ private void StartServer(string arguments)
6459 {
6560 Logger . Log ( "Adb server failed to start" , LoggingType . Error ) ;
6661 }
67-
68- // Dispose any token source that may exist (there shouldn't be any)
69- CancelToken ? . Dispose ( ) ;
70-
62+
7163 // Wait for the server to exit
7264 while ( ! ServerProcess . StandardError . EndOfStream )
7365 {
@@ -107,9 +99,6 @@ private void DisposeVariables(bool attemptKill)
10799 // Cleanup the token and process
108100 ServerProcess ? . Dispose ( ) ;
109101 ServerProcess = null ;
110-
111- CancelToken ? . Dispose ( ) ;
112- CancelToken = null ;
113102 }
114103
115104 /// <summary>
0 commit comments