[ https://issues.apache.org/jira/browse/THRIFT-3790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248745#comment-15248745 ]
Kyle Johnson commented on THRIFT-3790: -------------------------------------- Grabbed the timeout algo from the ReadDirect code. Works well enough to ensure a delay approximate to the timeout (close enough, anyway). If the wait fails it will do so either immediately or after the timeout. If it's after the timeout, it's just done and the exception is thrown (because ERROR_FILE_NOT_FOUND fails immediately). If it fails immediately and it's for something other than the pipe not being created, then we throw the exception. Really the only time it ends up using the delay is when the pipe hasn't been created. > Fix Delphi named pipe client to use timeout even when pipe doesn't yet exist > ---------------------------------------------------------------------------- > > Key: THRIFT-3790 > URL: https://issues.apache.org/jira/browse/THRIFT-3790 > Project: Thrift > Issue Type: Bug > Components: Delphi - Library > Affects Versions: 1.0 > Reporter: Kyle Johnson > Assignee: Jens Geyer > Priority: Minor > Fix For: 0.10.0 > > Attachments: > 0002-THRIFT-3790-Fix-Delphi-named-pipe-client-to-use-time.patch, > THRIFT-3790-fix-for-closing-and-reopening-client-pipe-connection.patch > > > In the Delphi test code, the test client closes the connection and then > immediately reopens it. However, it takes a small amount of time for the > server to tear down the connection and then rebuild it. In that time, the > client has issued an Open() call on the pipe client when the server hasn't > yet recreated the pipe. -- This message was sent by Atlassian JIRA (v6.3.4#6332)