mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-23 03:33:48 +00:00
Bugfix: FreeSWITCH::Client::sendmsg was returning the first FSES packet it received, which caused a race condition when an event was in transit; now it waits for Content-Type: command/reply
This commit is contained in:
parent
4861e34bd2
commit
189d81a1b2
@ -143,7 +143,13 @@ sub sendmsg($$$) {
|
|||||||
}
|
}
|
||||||
$self->output("\n");
|
$self->output("\n");
|
||||||
|
|
||||||
return $self->readhash($to);
|
for(;;) {
|
||||||
|
$e = $self->readhash(undef);
|
||||||
|
last if $e->{socketerror} or $e->{'content-type'} eq 'command/reply';
|
||||||
|
push @{$self->{events}}, $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub command($$) {
|
sub command($$) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user