protected void failMessages(Throwable cause)
{
List<Message.Mutable> messages = new ArrayList<>(1);
for (WebSocketExchange exchange : new ArrayList<>(_exchanges.values()))
{
Mutable message = exchange.message;
if (deregisterMessage(message) == exchange)
{
messages.add(message);
exchange.listener.onFailure(cause, messages);
messages.clear();