diff options
author | Jb Evain <jb@evain.net> | 2019-03-07 22:17:48 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-03-08 11:34:54 +0300 |
commit | 297b6ba3283437c47101cfcb809cca4b678e0158 (patch) | |
tree | 29fdde1a7f4dd5fa9f98eb9314700eba55d04fbb /mcs/class/Mono.Debugger.Soft | |
parent | 8fc751180cbe088985ae356bf24f18aa4b590275 (diff) |
[sdb] Avoid double lookup of replay packets
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index c98a6c37c58..fe305ad2012 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -1618,8 +1618,8 @@ namespace Mono.Debugger.Soft /* Wait for the reply packet */ while (true) { lock (reply_packets_monitor) { - if (reply_packets.ContainsKey (packetId)) { - byte[] reply = reply_packets [packetId]; + byte[] reply; + if (reply_packets.TryGetValue (packetId, out reply)) { reply_packets.Remove (packetId); PacketReader r = new PacketReader (this, reply); |