in reply to Re^8: Non closing sockets - threads
in thread Non closing sockets - threads

Just an update! I commented out $unitID and the error has gone.

Gah! I cannot believe I left that in. And uncommented. Because all my test clients run locally, I had to find another way of distinguishing gprs from cmd client. So I used a hardcoded unitID.

The two conditional lines are intended to be either/or, your system or mine.

Does it now work? (Except for exhibiting the same failure to disconnect problem!)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^10: Non closing sockets - threads
by igor1212 (Novice) on Dec 17, 2008 at 13:34 UTC
    Hello :) ,

    It's working, but both clients (localhost and gprs) executes cmdClient, gprsClient is not used.

    Correction - it is all correct!
    I'll do some tests now

    Gprs clients perfectly connects to the server and keep sending data.
    Localhost client does not execute commands and just closes itself, even if there are some gprs clients connected.
    If there is no connection, for I guess 500 sec, server closes itself.
    And at last, on clients abnormal disconnection, threads remain connected.

    Servers echo:

    gprsClient [4227801339] running on 4 4227801339: Command response: data test gprsClient [4227801339] running on 5 4227801339: Command response: data second client gprsClient [4227801339] running on 6 4227801339: Command response: data third client Command Client running on 7 cmdClient [859189299] disconnected
    If you have some more suggestions, I would really appreciate!

    Regards, Igor

      Did you see my /msgs requesting that we take this offline?