Android Question libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)

Discussion in 'Android Questions' started by Rabbit, Jan 31, 2015.

  1. Rabbit

    Rabbit Member Licensed User

    Hi,

    When I disable the WIFI connection, my application shows this message:

    libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)

    I am using these library in my apps:

    HTTP(1.36)
    Network(1.25)
    HttpUtils2Service


    The message comes as ToastMessageShow on the screen from this code I think (PushService):
    Code:
    Sub Service_Start (StartingIntent As Intent)

        
    If  CheckNetConnections <> -1 Then 
            
    Select StartingIntent.Action
                
    Case "com.google.android.c2dm.intent.REGISTRATION"
                    HandleRegistrationResult(StartingIntent)
                
    Case "com.google.android.c2dm.intent.RECEIVE"
                    MessageArrived(StartingIntent)
            
    End Select
        
    End If
    End Sub
    As you see I did added the CheckNetConnections but still the ugly message comes when I disable the WIFI connection.

    Code:
    Sub CheckNetConnections As Int

        
    ' This sub will determine the WiFi and network connection.
       
        
    Dim Server As ServerSocket 
        
    Dim WiFi_IP As String
        
    Dim Network_IP As String
       
        
    Server.Initialize(21341,"Net")
        Network_IP = 
    Server.GetMyIP
        WiFi_IP = 
    Server.GetMyWifiIP
        
    Server.Close

        
    If WiFi_IP = "127.0.0.1" OR Network_IP = "127.0.0.1"  Then
            
    Return -1
        
    Else

            
    Return 0
        
    End If
       
       
    End Sub

    Any help pleas to hide this message completely
    libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you connected with B4A-Bridge? It is probably the bridge app that shows this message.
     
  3. Rabbit

    Rabbit Member Licensed User

    I just tried to switch off the B4A-Bridge and the message does not come any more!

    Thank you Erel!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice