Browse Source

close connection without error

Darien Raymond 7 years ago
parent
commit
90ab42b1cb
1 changed files with 2 additions and 3 deletions
  1. 2 3
      transport/internet/quic/conn.go

+ 2 - 3
transport/internet/quic/conn.go

@@ -182,9 +182,8 @@ func (c *interConn) Write(b []byte) (int, error) {
 }
 
 func (c *interConn) Close() error {
-	c.stream.CancelRead(1)
-	c.stream.CancelWrite(1)
-	return nil
+	c.stream.CancelRead(0x00)
+	return c.stream.Close()
 }
 
 func (c *interConn) LocalAddr() net.Addr {