thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-4131) Javascript with WebSocket handles oneway methods wrong
Date Sun, 24 Sep 2017 15:49:00 GMT

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

ASF GitHub Bot commented on THRIFT-4131:
----------------------------------------

GitHub user jeking3 opened a pull request:

    https://github.com/apache/thrift/pull/1372

    THRIFT-4131: js / WebSocket / fix handling oneway methods

    Client: js
    Patch: Martin Hejnfelt <mh@newtec.dk>
    
    This closes #1372
    
    Submitted patch stored in Jira.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jeking3/thrift THRIFT-4131

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1372.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1372
    
----
commit 61c772902bd1a0ad583ae9910a26b535caf13674
Author: James E. King, III <jking@apache.org>
Date:   2017-09-24T15:46:27Z

    THRIFT-4131: js / WebSocket / fix handling oneway methods
    Client: js
    Patch: Martin Hejnfelt <mh@newtec.dk>
    
    This closes #1372

----


> Javascript with WebSocket handles oneway methods wrong
> ------------------------------------------------------
>
>                 Key: THRIFT-4131
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4131
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Compiler, JavaScript - Library
>    Affects Versions: 0.10.0
>         Environment: all
>            Reporter: Martin Hejnfelt
>            Assignee: James E. King, III
>            Priority: Blocker
>         Attachments: 0001-js-WebSocket-Fix-handling-oneway-methods.patch
>
>
> When using the WebSocket transport all client->server calls install a callback, and
we depend on these callbacks being push()'ed and shift()'ed sequentially, however, oneway
methods never gets a reply, and therefore the installed callback doesn't get removed, causing
the callback array to get "out of synchronization" so to speak, and subsequent calls, now
deal with the wrong callbacks, as data comes in.
> To remedy this I changed the compiler/generator to send a null callback to the transport->flush
method for oneway methods, and then in the WebSocket transport code, make a null check and
only install defined callbacks. This seem to fix it for me. I can send in patches if necessary.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message