Atmosphere / wasync

WebSockets with fallback transports client library for Node.js, Android and Java
http://async-io.org
161 stars 47 forks source link

Bug in TransportsUtil.java #152

Open Michenux opened 7 years ago

Michenux commented 7 years ago

Hi,

I think there's a bug in class TransportsUtil.java.

for (Object m : l) {
          return matchDecoder(e, m, nd, decodedObjects);
}

matchDecoder will be invoked only for the first element of the list and the following elements will be ignored.

Not sure but something like this would be better :

ArrayList<Object> list = new ArrayList<>();
for (Object m : l) {
   list.add(matchDecoder(e, m, nd, decodedObjects));
}
return list;
jfarcand commented 7 years ago

@Michenux Pull request welcomed :-)

jfarcand commented 7 years ago

Fixed https://github.com/Atmosphere/wasync/pull/153

slovdahl commented 7 years ago

This sounds similar to the issue I reported in #130, doesn't it? Maybe #130 wasn't properly fixed after all.

Michenux commented 7 years ago

Yes, the problem i had is the same as in #130. Works well with the fix but i tested it only with polling transport.

thabach commented 7 years ago

There were build test-failures, please reconsider the fix.