Fixed wrong error codes

This commit is contained in:
René Linder 2023-07-17 15:49:35 +02:00
parent 374074c62f
commit 548c80c974

View file

@ -84,12 +84,12 @@ Module lsocket
If bind_(SocketID, @lsockets_server(Str(SocketID)), SizeOf(sockaddr_in)) <> 0 If bind_(SocketID, @lsockets_server(Str(SocketID)), SizeOf(sockaddr_in)) <> 0
Close_(SocketID) Close_(SocketID)
DeleteMapElement(lsockets_server(), Str(SocketID)) DeleteMapElement(lsockets_server(), Str(SocketID))
ProcedureReturn -1 ProcedureReturn -2
Else Else
If listen_(SocketID, Queuelengt) <> 0 If listen_(SocketID, Queuelengt) <> 0
Close_(SocketID) Close_(SocketID)
DeleteMapElement(lsockets_server(), Str(SocketID)) DeleteMapElement(lsockets_server(), Str(SocketID))
ProcedureReturn -1 ProcedureReturn -3
EndIf EndIf
EndIf EndIf
ProcedureReturn SocketID ProcedureReturn SocketID