s3-sftp-proxy icon indicating copy to clipboard operation
s3-sftp-proxy copied to clipboard

mergedContext references incorrect index when waiting on a context pair to complete

Open BarakatX2 opened this issue 2 years ago • 0 comments

https://github.com/moriyoshi/s3-sftp-proxy/blob/d292467c629fd57c6d8471b324d8987a734b8c99/merged_context.go#L50-L55

The second assignment incorrectly references the 0 index. This results in the context error being set to nil when it should never be set to nil. The next time the context is passed to another, it causes a panic that crashes the entire server:

panic: context: internal error: missing cancel error

BarakatX2 avatar Sep 23 '22 21:09 BarakatX2