In message <roy-50fe2e.07273725052...@news.panix.com>, Roy Smith wrote:

> In article <gvd1id$8j...@lust.ihug.co.nz>,
>  Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> wrote:
> 
>> In message <roy-3c4ded.09214724052...@news.panix.com>, Roy Smith wrote:
>> 
>> > In article <gvb8fn$7g...@lust.ihug.co.nz>,
>> >  Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> wrote:
>> > 
>> >> The right thing to do is try to ensure that all your connections are
>> >> properly closed at shutdown. That may not be enough (if your server
>> >> crashes due to bugs), so the other thing you need to do is retry the
>> >> socket open, say, at 30-second intervals, until it succeeds.
>> > 
>> > That may be a reasonable thing to do for production code, but when
>> > you're building and debugging a server, it's a real pain to not be able
>> > to restart it quickly whenever you want (or need) to.
>> 
>> On the contrary, I run exactly the same logic--and that includes socket-
>> handling logic--in both test and production servers. How else can I be
>> sure it'll work properly in production?
> 
> I was just pointing out how it can be useful in cases such as the OP's,
> where he's getting bind errors when he restarts his server.

And I was pointing out how important it was to make sure your code deals 
gracefully with those errors.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to