From 19f08bca270957b99c928880c10637e2dfb13699 Mon Sep 17 00:00:00 2001 From: Klaus Alfert Date: Sun, 6 Jul 2014 22:42:48 +0200 Subject: [PATCH] Proper disconnect for Elixir 0.14.* --- lib/mqttex/server.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mqttex/server.ex b/lib/mqttex/server.ex index ff6601c..15784de 100644 --- a/lib/mqttex/server.ex +++ b/lib/mqttex/server.ex @@ -203,7 +203,7 @@ defmodule Mqttex.Server do # TODO: call unsubscribe all topics Lager.debug("Got Disconnect, going to disconnected mode") # no timeout here, we wait forever - {:noreply, state.state(:clean_disconnect)} + {:noreply, %Mqttex.Server{state | state: :clean_disconnect} } end ######################################################################################## ### All messages coming from the inside and the protocol handling