mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the bug of publish, server close the connection when timeout.
This commit is contained in:
parent
ffda615124
commit
836bc413f9
7 changed files with 35 additions and 15 deletions
Binary file not shown.
|
@ -48,6 +48,8 @@ package
|
|||
private const error_camera_get:int = 100;
|
||||
private const error_microphone_get:int = 101;
|
||||
private const error_camera_muted:int = 102;
|
||||
private const error_connection_closed:int = 103;
|
||||
private const error_connection_failed:int = 104;
|
||||
|
||||
public function srs_publisher()
|
||||
{
|
||||
|
@ -181,6 +183,17 @@ package
|
|||
}
|
||||
contextMenu.customItems = customItems;
|
||||
}
|
||||
|
||||
if (evt.info.code == "NetConnection.Connect.Closed") {
|
||||
js_call_stop();
|
||||
system_error(error_connection_closed, "server closed the connection");
|
||||
return;
|
||||
}
|
||||
if (evt.info.code == "NetConnection.Connect.Failed") {
|
||||
js_call_stop();
|
||||
system_error(error_connection_failed, "connect to server failed");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: FIXME: failed event.
|
||||
if (evt.info.code != "NetConnection.Connect.Success") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue