public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Brad Midgley <bmidgley@gmail.com>
To: John Freeman <johnf@optimation.com.au>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Intermittent "Address already in use" error
Date: Fri, 24 Jul 2009 10:47:52 -0600	[thread overview]
Message-ID: <d89ddf300907240947p174ffebaw6300e232bdc3d36f@mail.gmail.com> (raw)
In-Reply-To: <1346165.1248430092866.JavaMail.root@safetgram>

John,

> From time to time, I encounter an "Address already in use" error when
> attempting to bind a socket to a particular local adapter.  The python
> code looks like:
>
>   Listener = BluetoothSocket(SCO)
>   Listener.bind((addr1, ))
>   Listener.listen(1)

Is the error appearing when you want to rebind a short time after it
was used? Maybe you need to setsockopt SO_REUSEADDR just like you
would if you wanted to quickly rebind a tcp serversocket.

-- 
Brad Midgley

  reply	other threads:[~2009-07-24 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 10:08 Intermittent "Address already in use" error John Freeman
2009-07-24 16:47 ` Brad Midgley [this message]
     [not found] ` <5111969.1248454126654.JavaMail.root@safetgram>
2009-07-28  8:36   ` John Freeman
2009-07-28 17:31     ` Brad Midgley
     [not found]     ` <27042187.1248802358830.JavaMail.root@safetgram>
2009-07-30  9:17       ` John Freeman
2009-07-30 23:23         ` Brad Midgley
     [not found]         ` <2648525.1248996255356.JavaMail.root@safetgram>
2009-07-31  1:06           ` John Freeman
     [not found]           ` <33459247.1249002454978.JavaMail.root@safetgram>
2009-07-31  6:36             ` John Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d89ddf300907240947p174ffebaw6300e232bdc3d36f@mail.gmail.com \
    --to=bmidgley@gmail.com \
    --cc=johnf@optimation.com.au \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox