2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

async put

This commit is contained in:
2021-02-20 21:55:11 +03:00
parent 7c707637de
commit 4cfad2a242
6 changed files with 58 additions and 47 deletions

View File

@ -759,12 +759,18 @@ namespace Esiur.Net.IIP
.Done();
ready = true;
Warehouse.Put(this, this.LocalUsername, null, Server);
Warehouse.Put(this, this.LocalUsername, null, Server).Then(x =>
{
openReply?.Trigger(true);
OnReady?.Invoke(this);
openReply?.Trigger(true);
OnReady?.Invoke(this);
Server?.Membership.Login(session);
}).Error(x=>
{
openReply?.TriggerError(x);
});
Server?.Membership.Login(session);
//Global.Log("auth", LogType.Warning, "U:" + RemoteUsername + " IP:" + Socket.RemoteEndPoint.Address.ToString() + " S:AUTH");
@ -835,10 +841,12 @@ namespace Esiur.Net.IIP
ready = true;
// put it in the warehouse
Warehouse.Put(this, this.LocalUsername, null, Server);
Warehouse.Put(this, this.LocalUsername, null, Server).Then(x =>
{
openReply?.Trigger(true);
OnReady?.Invoke(this);
openReply?.Trigger(true);
OnReady?.Invoke(this);
}).Error(x=> openReply?.TriggerError(x));
}
}
@ -945,7 +953,7 @@ namespace Esiur.Net.IIP
}
}
return new AsyncReply<bool>();
return new AsyncReply<bool>(true);
}