[
https://issues.apache.org/jira/browse/THRIFT-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylwester Lachiewicz resolved THRIFT-3204.
------------------------------------------
Resolution: Fixed
The shadowed {{err}} this ticket describes is gone.
[processRequests|https://github.com/apache/thrift/blob/master/lib/go/thrift/simple_server.go]
on master treats EOF as nil, returns transport exceptions to the accept
goroutine, which logs them through {{slog}}, and keeps serving the connection
on any other error from {{Process}}. Resolving as fixed on master.
_This comment was created with AI assistance._
> SimpleServer process loop missed handle some error
> --------------------------------------------------
>
> Key: THRIFT-3204
> URL: https://issues.apache.org/jira/browse/THRIFT-3204
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library
> Affects Versions: 0.9.2
> Reporter: Jing Wang
> Assignee: Jing Wang
> Priority: Major
> Labels: patch
>
> SimpleServer do not handle all errors returned by processor.
> When a error returned by processor.Process methods In SimpleServer's
> processRequests, program will omit this error and log nothing to the
> programmer if this error is not thrift.TTransportException type.
> If a Protocol error happens, the server will close the client connection and
> log nothing,
> This bug is cause by a wrong "else if" condition. In the if esle condition,
> the inside variable "err" will cover the scope of outside "err", and it will
> always be "nil", the "else if" condition will never reached
--
This message was sent by Atlassian Jira
(v8.20.10#820010)