I'm testing a similar behavior using the demo version of your server
Actual client - from pump 2.8.0, server from the Inetlab.SMPP site SmppServer Demo 2.0.0.0 version for net
1) start the server
2) create SmppClient (as a singleton) with the flag ConnectionRecovery = true,
3) initiate the connection according to your examples
if (await client.ConnectAsync("localhost", 7777))
{
Console.WriteLine("Connected to SMPP server");
BindResp bindResp = await client.BindAsync("login", "password", ConnectionMode.Transceiver);
if (bindResp.Header.Status == CommandStatus.ESME_ROK)
{
Console.WriteLine("Bound with SMPP server");
}
}
4) I call SubmitAsync for the 1st time
var responses = await _client.SubmitAsync(
SMS.ForSubmit()
.Text(text)
.From("1111")
.To("79171234567")
.Coding(DataCodings.UCS2)
.DeliveryReceipt()
);
if (responses.Any(a => a.Client == null))
{
throw new SmppConnectionException("Is lost connect");
}
4) restart the server
5) I call the 2nd time SubmitAsync
6) connection restored - all messages reached the server
-----------------
this is like an ideal situation, but in life everything is different, so I send a lot of messages from different flows
at this time I restart the server
as a result, the connection is not restored how much do not wait
sometimes such an error arrives
04.05.2020 16:46:02:ERROR: 80: (SmppClient42.Socket) Connection failed. Unexpected error. Exception: System.TimeoutException: The operation has timed out.
at Inetlab.SMPP.Common.TaskExtensions.TimeoutAfter(Task task, TimeSpan timeout)
at Inetlab.SMPP.Common.SmppSocket.???