mirror of https://github.com/deavmi/doap
parent
4daf3daad0
commit
94b9c2d714
|
@ -77,27 +77,6 @@ public class CoapClient
|
|||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a new message ID
|
||||
*
|
||||
* Returns: the next message id
|
||||
*/
|
||||
private final ushort newMid()
|
||||
{
|
||||
ushort newValue;
|
||||
|
||||
// Lock rolling counter
|
||||
this.rollingLock.lock();
|
||||
|
||||
newValue = this.rollingMid;
|
||||
this.rollingMid++;
|
||||
|
||||
// Unlock rolling counter
|
||||
this.rollingLock.unlock();
|
||||
|
||||
return newValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximum lifetime of a message ID before
|
||||
* it is considered for re-use
|
||||
|
|
Loading…
Reference in New Issue