httpserver: make sure that socket is freed even if StartServerSocket raised an exception

This commit is contained in:
Ondrej Pokorny 2023-04-29 13:40:27 +02:00 committed by Michael Van Canneyt
parent e74d89ce62
commit 262904b8c1

View File

@ -1464,8 +1464,11 @@ begin
SetupConnectionHandler;
CreateServerSocket;
SetupSocket;
StartServerSocket;
FreeServerSocket;
try
StartServerSocket;
finally
FreeServerSocket;
end
end
else
StopServerSocket;