Skip to content

Only allow sending one blocking api command at a time. #7

@pragmatrix

Description

@pragmatrix

FreeSWITCH documentation states at https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Modules/mod_event_socket_1048924/#31-api:

Send a FreeSWITCH API command, blocking mode. That is, the FreeSWITCH instance won't accept any new commands until the api command finished execution.

free-socks currently supports sending multiple blocking and - perhaps soon - other commands by letting clients clone the Client instance. Preventing the clone would not solve the problem, because async functions can be used as futures and initiated concurrently as long &self is used. An alternative would be to prevent cloning by using &mut self, schedule blocking commands, or detect the race condition and return an error?

And what about events, can they be received in between?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions