winlin

fix bug of forward, erase msgs when error

@@ -316,6 +316,10 @@ int SrsForwarder::forward() @@ -316,6 +316,10 @@ int SrsForwarder::forward()
316 ret = client->send_message(msg); 316 ret = client->send_message(msg);
317 if (ret != ERROR_SUCCESS) { 317 if (ret != ERROR_SUCCESS) {
318 srs_error("forwarder send message to server failed. ret=%d", ret); 318 srs_error("forwarder send message to server failed. ret=%d", ret);
  319 +
  320 + // convert the index to count when error.
  321 + i++;
  322 +
319 break; 323 break;
320 } 324 }
321 } 325 }