implement closing the quic client with an error

This commit is contained in:
Marten Seemann
2016-12-17 10:11:31 +07:00
parent c42262c2b3
commit 08c267431b
5 changed files with 16 additions and 11 deletions

View File

@@ -110,8 +110,8 @@ func (c *Client) OpenStream(id protocol.StreamID) (utils.Stream, error) {
}
// Close closes the connection
func (c *Client) Close() error {
_ = c.session.Close(nil)
func (c *Client) Close(e error) error {
_ = c.session.Close(e)
return c.conn.Close()
}