When I setup websocket to echo the input:
The output message is never sent to the client.
Actually, the message is output from the function node but the exit point never delivers it.
msg._session is required if you want to send a reply to the originator. If you remove it, all ws clients that are subscribed to your endpoint will get the message.
Two things to check:
Make sure that the output from your function node is what you think it is using a debug node on the output.
Check your client code to make sure that it is actually connected to the right endpoint. If the client is in a web page, you can use your browser dev tools to check the flow of data.