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");
|
||||
|
||||
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($$) {
|
||||
|
|
Loading…
Reference in New Issue