Ver código fonte

fix done.Close() in defer

Darien Raymond 7 anos atrás
pai
commit
a8aab30e6b
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      app/proxyman/mux/mux.go

+ 3 - 1
app/proxyman/mux/mux.go

@@ -254,7 +254,9 @@ func (m *Client) handleStatusEnd(meta *FrameMetadata, reader *buf.BufferedReader
 }
 
 func (m *Client) fetchOutput() {
-	defer common.Must(m.done.Close())
+	defer func() {
+		common.Must(m.done.Close())
+	}()
 
 	reader := buf.NewBufferedReader(m.link.Reader)