[ 
https://issues.apache.org/jira/browse/THRIFT-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278746#comment-13278746
 ] 

Hudson commented on THRIFT-1593:
--------------------------------

Integrated in Thrift-hs #7 (See [https://builds.apache.org/job/Thrift-hs/7/])
    THRIFT-1593 Pass on errors like "connection closed" to the handler module
Patch: Björn Bylander
+ bump jsx (Revision 1340073)

     Result = FAILURE
roger : http://svn.apache.org/viewvc/?view=rev&rev=1340073
Files : 
* /thrift/trunk/lib/erl/rebar.config
* /thrift/trunk/lib/erl/src/thrift_processor.erl

                
> Pass on errors like "connection closed" to the handler module
> -------------------------------------------------------------
>
>                 Key: THRIFT-1593
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1593
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Erlang - Library
>    Affects Versions: 0.9
>            Reporter: Björn Bylander
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: thrift-1593-pass_on_errors_to_the_handler_module.patch
>
>
> Currently "connection closed" type errors are reported using the error_logger 
> module and, normally, printed to the console as
> {noformat}
> 'Request' had an error: {{badmatch,
>                           {{protocol,thrift_binary_protocol,
>                             {binary_protocol,
>                              {transport,thrift_buffered_transport,
>                               {buffered_transport,
>                                {transport,thrift_socket_transport,
>                                 {data,#Port<0.2092>,infinity}},
>                                []}},
>                              true,true}},
>                            {error,closed}}},
>                          [{thrift_processor,send_reply,5,[]},
>                           {thrift_processor,handle_function,3,[]},
>                           {thrift_processor,loop,1,[]}]}
> {noformat}
> The message above can be reproduced by setting up an Erlang based Thrift 
> server using the binary protocol and socket transport, letting the client 
> connect and issue a command and, before the command reply has been sent from 
> the server, let the client forcefully terminate the connection (for example 
> by killing the client process).
> There is no easy way for the service callback module to suppress this message 
> and there is no way for it to know if the connection has been closed. I'd 
> like information about errors in the thrift server code to be passed on to 
> the service callback module before the process exits. That way the service 
> implementor can choose how to handle errors like "connection closed".
> I've attached an implementation which fixes this good enough for my own use 
> as a patch to thrift_processor.erl.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to