[Modify] Replace it
This commit is contained in:
parent
8e5baaea54
commit
2b35412580
@ -638,19 +638,32 @@ namespace WebSocketSharp.Server
|
|||||||
/// A <see cref="TimeSpan"/> that represents the wait time. The default value is
|
/// A <see cref="TimeSpan"/> that represents the wait time. The default value is
|
||||||
/// the same as 1 second.
|
/// the same as 1 second.
|
||||||
/// </value>
|
/// </value>
|
||||||
|
/// <exception cref="ArgumentException">
|
||||||
|
/// The value specified for a set operation is zero or less.
|
||||||
|
/// </exception>
|
||||||
public TimeSpan WaitTime {
|
public TimeSpan WaitTime {
|
||||||
get {
|
get {
|
||||||
return _services.WaitTime;
|
return _services.WaitTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
var msg = _state.CheckIfAvailable (true, false, false) ?? value.CheckIfValidWaitTime ();
|
string msg;
|
||||||
if (msg != null) {
|
if (!value.CheckWaitTime (out msg))
|
||||||
_log.Error (msg);
|
throw new ArgumentException (msg, "value");
|
||||||
|
|
||||||
|
if (!canSet (out msg)) {
|
||||||
|
_log.Warn (msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_services.WaitTime = value;
|
lock (_sync) {
|
||||||
|
if (!canSet (out msg)) {
|
||||||
|
_log.Warn (msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_services.WaitTime = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user