RE: Problem with blocking connect().

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
> -----Original Message-----
> From: Vjacheslav Chekushin [mailto:[email protected]]

> Hi, Oded.
> As I undestand from kannel architecure, we have 1 thread that 
> write requests 
> from client to network. 

For HTTP alone, not every connection. 

> So if one connect will blocks for 1 
> minute, then thread
> stops to serve other requests for this time and other clients wait for
> this time too.

I don't think we need to change that. connect() should never block for 1 minute- while the TCP specs allow for upto 2 minutes, this is hardly ever the case. the latency from one corner of the earth to the other is hardly over a few seconds. the only way that a connect would block for so long is if you either have a terribly malfunctioned server or you are trying to connect to a port blocked by a firewall with a DROP policy - either case the configuration is not valid, so I don't think we should program Kannel to work with it, and I personally would prefer that my system would get stuck on such cases as that would alert me that something in my setup is broken.

--
Oded Arbel
m-Wise mobile solutions
[email protected]

+972-9-9581711 (116)
+972-67-340014

::..
Von Neumann was the subject of many dotty professor stories.  Von Neumann
supposedly had the habit of simply writing answers to homework assignments on
the board (the method of solution being, of course, obvious) when he was asked
how to solve problems.  One time one of his students tried to get more helpful
information by asking if there was another way to solve the problem.  Von
Neumann looked blank for a moment, thought, and then answered, "Yes.".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.