[AWS] raised SOCKETS.SOCKET_ERROR : Bind failed (errno is 98)

David Marceau davidmarceau@sympatico.ca
Tue, 11 Jun 2002 13:28:50 -0400


Jeremy Cowgar wrote:
> 
> When I am working with my main loop:
> 
> AWS.Server.Start
>         (
>                 WS,
>                 Dispatcher => H,
>                 Config => C
>         );
> 
> AWS.Server.Wait (AWS.Server.Q_Key_Pressed);
> AWS.Server.Shutdown (WS);
> 
> and quit via the 'Q' key, I always have to wait about 1 minute before I
> run the program again or I get the exception:
> 
> raised SOCKETS.SOCKET_ERROR : Bind failed (errno is 98)
> 
> Is their something wrong? Am I not closing the server correctly? A
> minute or so after quitting my program, I can then load it again.
> 
> Thanks,
> 
> Jeremy
> 
> _______________________________________________
> AWS mailing list
> AWS@lists.act-europe.fr
> http://lists.act-europe.fr/mailman/listinfo/aws
On my linux box, after pressing q, my prompt comes back.
You are right that if I restart the server right away, it might not
start up because the binding will fail.
That said the OS needs to clean up all the socket stuff before being
able to bind again.
IMHO it's not a bug, it's a feature :)
It's kind of like the hard drive that does a sync(writing everything to
disk) every 30 seconds or so.
In fact a socket is a special file and yes I am guessing it has to do
with sync correct me if I am wrong :)
You might want to run the command "sync" in linux.
You might want to go into your windows file explorer and press "F5" for
refreshing the explorer directory tree.(windows equivalent to sync).

I hope this helps.

Santé bonheur,
David Marceau