Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 28, 2024
I've made a little test:
blocking the network connection to android.googleapis.com using iptables with 
the following command:
sudo iptables -I OUTPUT -d 173.194.70.95 -j DROP

The code blocks in conn.getOutputStream().

In the attachment my suggestion for fixing the problem: adding a constant for 
network timeout and adding setConnectTimeout and setReadTimeout in 
getConnection method.





Original comment by [email protected] on 18 Mar 2014 at 9:04

Attachments:

from gcm.

dmg3 avatar dmg3 commented on September 28, 2024

I was unable to replicate with the iptables trick; however, on my production server, I believe I encountered this issue during a period of intermittent network connectivity. I have 3 jobs that are permanently "hung", and I know that they were attempting to send different messages at the time of my network outage. Other jobs that were running at the time were spewing exceptions which were originating in the Sender.post method (where the conn.getOutputStream() is called ) . Exceptions such as ConnectionReset, Remote Host closed connection during handshake, connection timed out, etc. So I believe that some combination of network trouble will cause this method to block or hang indefinitely. +1 for the suggested fix of set timeout values

from gcm.

kroikie avatar kroikie commented on September 28, 2024

This PR allows for the setting of connection timeout values. If this issue persists please submit an issue with more detail if possible.

from gcm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.