From eb56b0fae8d1ce5648798ba7fee56fecf43cf4c9 Mon Sep 17 00:00:00 2001 From: drieseng Date: Sat, 2 Jul 2016 16:24:22 +0200 Subject: [PATCH] Also use Interlocked.Increment(ref long) on Windows Phone. --- src/Renci.SshNet/Sftp/SftpSession.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Renci.SshNet/Sftp/SftpSession.cs b/src/Renci.SshNet/Sftp/SftpSession.cs index 20ca72e5..93d52f46 100644 --- a/src/Renci.SshNet/Sftp/SftpSession.cs +++ b/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); } }