Compatible with esockd 4.x

This commit is contained in:
Feng Lee 2017-12-06 14:42:26 +08:00
parent c3c5589452
commit 9f1c3a5899
1 changed files with 1 additions and 0 deletions

View File

@ -141,6 +141,7 @@ send_fun(Conn, Peername) ->
emqttd_metrics:inc('bytes/sent', iolist_size(Data)), emqttd_metrics:inc('bytes/sent', iolist_size(Data)),
try Conn:async_send(Data) of try Conn:async_send(Data) of
ok -> ok; ok -> ok;
true -> ok; %% Compatible with esockd 4.x
{error, Reason} -> Self ! {shutdown, Reason} {error, Reason} -> Self ! {shutdown, Reason}
catch catch
error:Error -> Self ! {shutdown, Error} error:Error -> Self ! {shutdown, Error}