retry client offers immediately instead of reset, combine sendOffer and receiveAnswer into exchangeSDP

This commit is contained in:
Serene Han 2016-03-08 19:37:10 -08:00
parent d61534b3a0
commit 960a136c64
3 changed files with 70 additions and 62 deletions

View file

@ -47,8 +47,6 @@ func copyLoop(a, b net.Conn) {
wg.Done()
}()
wg.Wait()
// a.Close()
// b.Close()
log.Println("copy loop ended")
}
@ -108,9 +106,7 @@ func handler(conn *pt.SocksConn) error {
// TODO: Make SOCKS acceptance more independent from WebRTC so they can
// be more easily interchanged.
copyLoop(conn, remote)
// <-remote.endChannel
log.Println("----END---")
return nil
}