funbox / smppex

✉️ SMPP 3.4 protocol and framework implementation in Elixir
MIT License
106 stars 34 forks source link

Set default_call_timeout to SMPPEX.Session.Defaults or config #64

Closed sergey-chechaev closed 4 years ago

sergey-chechaev commented 5 years ago

Hi, than you for your work!

I got a timeout error on production when invoke Session.send_pdu/2. This happened when TransportSession.call(pid, {:send_pdu, pdu}) no reply is received within 5000 milliseconds. TransportSession has module attribute @timeout but we can't pass timeout through Session.send_pdu/2 and we can't change @default_call_timeout. I would like to solve this issue if you don't mind. I have two ways:

  1. set default_call_timeout through SMPPEX.Session.Defaults module and add attribute timeout for Session.send_pdu/3
  2. set default_call_timeout in config/confix.ex file and add attribute timeout for Session.send_pdu/3.
savonarola commented 5 years ago

Hello!

Could you please tell where you called Session.send_pdu/2? Was it done somewhere in a session handler?

sergey-chechaev commented 5 years ago

Hello!

Could you please tell where you called Session.send_pdu/2? Was it done somewhere in a session handler?

I called Session.send_pdu in specific elixir business service in my elixir project and some times I have a timeout error there but when i increase @timeout for TransportSession module error is disappeared. I want to create PR where you can change default_call_timeout and upgrade Session.send_pdu/3 where third attribute is timeout.

savonarola commented 5 years ago

Hello!

I think such upgrade can be useful for busy sessions.

savonarola commented 4 years ago

Resolved by #65