mirror of https://github.com/deavmi/doap
parent
dc23fbd1a0
commit
4daf3daad0
|
@ -124,8 +124,6 @@ public class CoapClient
|
|||
*/
|
||||
private final ushort newMid2()
|
||||
{
|
||||
ushort guessStart = 0;
|
||||
|
||||
// Lock rolling counter
|
||||
this.rollingLock.lock();
|
||||
|
||||
|
@ -135,6 +133,7 @@ public class CoapClient
|
|||
this.rollingLock.unlock();
|
||||
}
|
||||
|
||||
// Message IDs which are in use
|
||||
ushort[] inUse;
|
||||
|
||||
foreach(ushort occupied; this.mids.keys())
|
||||
|
@ -157,10 +156,8 @@ public class CoapClient
|
|||
// ... free and use that (also don't forget to register it)
|
||||
import doap.utils : findNextFree;
|
||||
ushort newMid = findNextFree(inUse);
|
||||
|
||||
this.mids[newMid] = StopWatch(AutoStart.yes);
|
||||
|
||||
|
||||
return newMid;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue