PS: forgot the workaround:

session.removeMessageHandler(session.getMessageHandlers().iterator().next());



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

2017-12-21 10:54 GMT+01:00 Romain Manni-Bucau <rmannibu...@gmail.com>:

> Hi guys,
>
> shouldnt org.apache.tomcat.websocket.WsSession#removeMessageHandler
> handle the wrapped instance the other way around?
>
> My isssue is this kind of code:
>
> session.addMessageHandler(MyPayload.class, this);
> session.removeMessageHandler(MyPayload.class, this);
>
> this doesnt work cause the instance is wrapped but not tested this way, i
> would need to remove the handler passing the wrapped instance but i cant
> access it transparently through the javax code.
>
> Did I miss something?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau>
>

Reply via email to