提交 189d81a1 authored 作者: Luke Dashjr's avatar Luke Dashjr

Bugfix: FreeSWITCH::Client::sendmsg was returning the first FSES packet it…

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
上级 4861e34b
......@@ -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($$) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论