Add stop api listener function

This commit is contained in:
turtled 2017-06-13 11:15:26 +08:00
parent f18051c340
commit bbcc082a0d
1 changed files with 2 additions and 2 deletions

View File

@ -200,9 +200,9 @@ stop_listener({Proto, ListenOn, _Opts}) when Proto == http; Proto == ws ->
mochiweb:stop_http('mqtt:ws', ListenOn);
stop_listener({Proto, ListenOn, _Opts}) when Proto == https; Proto == wss ->
mochiweb:stop_http('mqtt:wss', ListenOn);
sstop_listener({Proto, ListenOn, _Opts}) when Proto == api ->
stop_listener({Proto, ListenOn, _Opts}) when Proto == api ->
mochiweb:stop_http('mqtt:api', ListenOn);
top_listener({Proto, ListenOn, _Opts}) ->
stop_listener({Proto, ListenOn, _Opts}) ->
esockd:close(Proto, ListenOn).
-ifdef(TEST).