Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7547963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:35:30+00:00 2026-05-30T09:35:30+00:00

How to force BluetoothServerSocket to stop waiting for an incoming connection started with accept()

  • 0

How to force BluetoothServerSocket to stop waiting for an incoming connection started with accept()?

When I’m calling stop() all I get is “ERROR/BluetoothSppPort(2211): invalid port state for disconnection” in LogCat.

I need to stop controlling thread but it can’t be destroyed while the socket is waiting for a connection.

I know about accept(int timeout) but it is not what I need.

Are there any solutions or workarounds?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:35:31+00:00Added an answer on May 30, 2026 at 9:35 am
    while (socket == null) {
            try {
                socket = mmServerSocket.accept(50);
            } catch (IOException e) {
                if( UserReqestToExit )//if the user reqest to exit ,use sync
                    return;
            }
            // If a connection was accepted
            if (socket != null) {
                try {
                    mmServerSocket.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to force inline a member function and I get the error: a_class::mem_func(),
Does Microsoft force an update down to all of its users of windows-update? Is
Is there anyway to force XAML to completely redraw all of its elements and
My android activity force closes at irregular times. All it is supposed to do
how to force the EditText to accept only numbers.?
I would like to force svcutil to generate all data contracts in an assembly
Is it possible to force the C# compiler to pull all the referenced calls
I want force certain routes to always use a secure connection in my express
Does Google force employees who have offers from Facebook to leave immediately?
I want to force the current execution line to a specific line in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.