补充写入请求指令Write()

This commit is contained in:
LQF 2017-04-18 22:28:28 +08:00
parent cea66d5556
commit b6854edecd
1 changed files with 2 additions and 2 deletions

View File

@ -899,12 +899,12 @@ int TokenClient::WriteAsync(int start, const Buffer& bs, int msTimeout)
handle.State = (void*)start;
_Expect = &handle;
Write(start, bs);
handle.WaitOne(msTimeout);
if (_Expect == &handle) _Expect = nullptr;
// 可能失败
if (!handle.Result) return 0;
if (!handle.Result) return 1;
return (int)handle.State;
}