diff --git a/src/eWSrv.erl b/src/eWSrv.erl index a2fc9bf..8bd2ce0 100644 --- a/src/eWSrv.erl +++ b/src/eWSrv.erl @@ -53,12 +53,5 @@ openSrv(WSrvName, Port, WsOpts) -> end. closeSrv(WSrvNameOrPort) -> - WSrvName = - case is_integer(WSrvNameOrPort) of - true -> - wSrvName(WSrvNameOrPort); - _ -> - WSrvNameOrPort - end, - supervisor:terminate_child(eWSrv_sup, WSrvName), - supervisor:delete_child(eWSrv_sup, WSrvName). \ No newline at end of file + WSrvName = ?IIF(is_integer(WSrvNameOrPort), wSrvName(WSrvNameOrPort), WSrvNameOrPort), + eNet:close(WSrvName). \ No newline at end of file