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

James Reggio commented on THRIFT-3786:
--------------------------------------

These two issues share an root cause; specifically, code is executed when the 
secure socket emits `connect`, then again when it emits `secureConnect`.

The handler should only run on `secureConnect` for TLS sockets, and on 
`connect` for standard (insecure) sockets.

> Node.js TLS emits 'connect' before connection is ready
> ------------------------------------------------------
>
>                 Key: THRIFT-3786
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3786
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>            Reporter: James Reggio
>
> When using a TLS connection, the Node.js Thrift connection instance will emit 
> a `connect` event early, making it possible to lose commands.
> `connect` is emitted by the Thrift connection instance when the underlying 
> socket is opened, instead of when the TLS handshake has completed. Making 
> matters worse, the offline queue is flushed during this premature `connect`, 
> which means that any commands issued prior to the TLS connection handshake 
> will be lost.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to