File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,8 @@ func main() {
6767 stream , err := econn .OpenStream ()
6868 util .Check (err )
6969
70- stream2 , err := econn .OpenStream ()
71- util .Check (err )
72-
7370 fmt .Println ("Connected; type 'exit' to shutdown gracefully" )
7471
75- stream2 .Write ([]byte ("testt\n " ))
76-
7772 // Simulate a chat session
7873 util .Chat (stream )
7974
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
1313 "fmt"
1414 "math/big"
1515 "net"
16- "time"
1716
1817 "github.com/pion/dtls/v3/examples/util"
1918 quic "github.com/refraction-networking/uquic"
@@ -66,15 +65,11 @@ func main() {
6665 continue
6766 }
6867
69- for i := 0 ; i < 2 ; i ++ {
70- ctx , _ := context .WithTimeout (context .Background (), 1 * time .Second )
71- stream , err := econn .AcceptStream (ctx )
72- if err != nil {
73- continue
74- }
75- hub .Register (& streamConn {Stream : stream , Connection : econn })
76-
68+ stream , err := econn .AcceptStream (context .Background ())
69+ if err != nil {
70+ continue
7771 }
72+ hub .Register (& streamConn {Stream : stream , Connection : econn })
7873
7974 // `conn` is of type `net.Conn` but may be casted to `dtls.Conn`
8075 // using `dtlsConn := conn.(*dtls.Conn)` in order to to expose
You can’t perform that action at this time.
0 commit comments