synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
789 stars 325 forks source link

Socket.Bind should throw in case of fatal error during bind #309

Closed pavelmash closed 4 years ago

pavelmash commented 4 years ago

@LongDirtyAnimAlf commit for FreeBSD [2958b7fc64] introduce an unexpected behavior for TCrtSocket.OpenBind

Before [2958b7fc64] in case for example port is already used we got a valid Exception, after Alfred's patch we got an exception while try to set timeout on invalid socket (below in code, not in place where actual exception should ocures).

This patch tries to fix TCrtSocket.OpenBind BUT without fExecuteFinished modification server hangs, with fExecuteFinished modification - TestSQL3 (and my application too) throws EThreadError

@synopse - need your help for correct fix