-
AG70
- Posts: 15
- Joined: Sun May 19, 2013 5:48 pm
Post
by AG70 » Thu Feb 18, 2021 6:49 am
Hello,
I am using version 2.9.4
on
Code: Select all
private async void _server_evClientBind(object sender, SmppServerClient client, Inetlab.SMPP.PDU.Bind data)
I am trying to return CommandStatus.ESME_RINVSYSID but still SMPP Server continue with Bind instead of stopping the bind and return ESME_RINVSYSID to client.
Code: Select all
if (objUser == null)
{
data.Response.Header.Status = CommandStatus.ESME_RINVSYSID; // Invalid System ID
return;
}
Thanks for any help,
AG
Kind Regards,
Asaf
-
alt
- Site Admin
- Posts: 988
- Joined: Tue Apr 25, 2006 9:45 am
Post
by alt » Thu Feb 18, 2021 3:16 pm
Hello Asaf,
When you use async method for void event handler the processing is finished on first await. I suppose you get the user with awaitable method. Library doesn't await for the completion of the async method. It will be implemented with Task events.
For now you need to set data.Response to null and send it manually when you need.
https://docs.inetlab.com/smpp/v2.9/arti ... onses.html
-
AG70
- Posts: 15
- Joined: Sun May 19, 2013 5:48 pm
Post
by AG70 » Thu Feb 18, 2021 4:48 pm
Thanks you very much for your help.
Kind Regards,
Asaf