瀏覽代碼

Also use Interlocked.Increment(ref long) on Windows Phone.

drieseng 9 年之前
父節點
當前提交
eb56b0fae8
共有 1 個文件被更改,包括 1 次插入10 次删除
  1. 1 10
      src/Renci.SshNet/Sftp/SftpSession.cs

+ 1 - 10
src/Renci.SshNet/Sftp/SftpSession.cs

@@ -45,16 +45,7 @@ namespace Renci.SshNet.Sftp
         {
             get
             {
-#if WINDOWS_PHONE
-                lock (this)
-                {
-                    this._requestId++;
-                }
-
-                return (uint)this._requestId;
-#else
-                return ((uint) Interlocked.Increment(ref _requestId));
-#endif
+                return (uint) Interlocked.Increment(ref _requestId);
             }
         }