mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
WebRTC: Refine code and destroy session when tcp close.
This commit is contained in:
parent
07339e1417
commit
efa0851476
10 changed files with 181 additions and 157 deletions
|
@ -1505,7 +1505,7 @@ srs_error_t SrsServer::fd_to_resource(SrsListenerType type, srs_netfd_t& stfd, I
|
|||
// If reuse HTTP server with WebRTC TCP, peek to detect the client.
|
||||
if (reuse_rtc_over_server_ && (type == SrsListenerHttpStream || type == SrsListenerHttpsStream)) {
|
||||
SrsTcpConnection* skt = new SrsTcpConnection(fd2);
|
||||
SrsBufferedReader* io = new SrsBufferedReader(skt);
|
||||
SrsBufferedReadWriter* io = new SrsBufferedReadWriter(skt);
|
||||
|
||||
uint8_t b[10]; int nn = sizeof(b);
|
||||
if ((err = io->peek((char*)b, &nn)) != srs_success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue