Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Snawoot committed Oct 14, 2024
1 parent fb732f1 commit d2fb7a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pool/connpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (p *ConnPool) worker() {
queue_id := p.prepared.Push(output_ch)
p.qmux.Unlock()
readctx, readcancel := context.WithCancel(p.ctx)
readdone := make(chan struct{}, 1)
readdone := make(chan struct{})
go func() {
connReadContext(readctx, conn, dummybuf)
close(readdone)
Expand Down
1 change: 1 addition & 0 deletions server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (h *ConnHandler) Handle(ctx context.Context, c net.Conn) {
if err != nil {
h.logger.Error("Error on connection retrieve from pool: %v", err)
c.Close()
return
}
h.proxy(ctx, c, tlsconn)
}

0 comments on commit d2fb7a8

Please sign in to comment.