winlin

cleanup connections when terminate server.

@@ -324,7 +324,10 @@ int SrsRtmpConn::service_cycle() @@ -324,7 +324,10 @@ int SrsRtmpConn::service_cycle()
324 ret = stream_service_cycle(); 324 ret = stream_service_cycle();
325 325
326 // stream service must terminated with error, never success. 326 // stream service must terminated with error, never success.
327 - srs_assert(ret != ERROR_SUCCESS); 327 + // when terminated with success, it's user required to stop.
  328 + if (ret == ERROR_SUCCESS) {
  329 + continue;
  330 + }
328 331
329 // when not system control error, fatal error, return. 332 // when not system control error, fatal error, return.
330 if (!srs_is_system_control_error(ret)) { 333 if (!srs_is_system_control_error(ret)) {