kpumuk commented on code in PR #3727:
URL: https://github.com/apache/thrift/pull/3727#discussion_r3793617373
##########
lib/rb/lib/thrift/server/thread_pool_server.rb:
##########
@@ -47,30 +47,28 @@ def serve
loop do
@thread_q.push(:token)
Thread.new do
- begin
- loop do
- begin
- client = @server_transport.accept
- rescue => e
- next if defined?(OpenSSL::SSL::SSLError) &&
e.is_a?(OpenSSL::SSL::SSLError)
- raise
- end
- trans = @transport_factory.get_transport(client)
- prot = @protocol_factory.get_protocol(trans)
- begin
- loop do
- @processor.process(prot, prot)
- end
- rescue Thrift::TransportException, Thrift::ProtocolException
=> e
- ensure
- trans.close
+ loop do
+ begin
+ client = @server_transport.accept
+ rescue => e
+ next if defined?(OpenSSL::SSL::SSLError) &&
e.is_a?(OpenSSL::SSL::SSLError)
+ raise
+ end
+ trans = @transport_factory.get_transport(client)
+ prot = @protocol_factory.get_protocol(trans)
+ begin
+ loop do
+ @processor.process(prot, prot)
end
+ rescue Thrift::TransportException, Thrift::ProtocolException => e
Review Comment:
`Lint/UselessAssignment` detects this unused exception variable and will be
enabled in a separate follow-up PR that addresses its repository-wide offenses,
including generated code. This PR remains scoped to `Style/RedundantBegin`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]