TCP connection between nodes, should select raise exception ?
Posted: Sat Dec 04, 2021 9:54 pm
Hey,
I have pretty standard code based on BSD socket select.
Shouldn't select() catch the condition that a socket is disconnected and can't be written to ?
Error message changes after the first error, then keeps on going instead of getting an error condition raised.
https://sourceforge.net/p/espalarm/svnc ... /Peers.cpp
Danny
I have pretty standard code based on BSD socket select.
Shouldn't select() catch the condition that a socket is disconnected and can't be written to ?
Error message changes after the first error, then keeps on going instead of getting an error condition raised.
https://sourceforge.net/p/espalarm/svnc ... /Peers.cpp
Danny
Code: Select all
I (19:31:58.131) Peers: CallPeerAsync: wrote {"weather":"GTWT02","name":"prototype","temp":4.400000095,"channel":1,"txid":124,"humidity":110,"battery-low":false,"seqno":69} to
I (19:32:57.102) Temperature: GTWT02 (ch 1 txid 124) : 4.4°C, hum 110%
I (19:32:57.111) Peers: CallPeerAsync: wrote {"weather":"GTWT02","name":"prototype","temp":4.400000095,"channel":1,"txid":124,"humidity":110,"battery-low":false,"seqno":70} to
I (19:33:56.192) Temperature: GTWT02 (ch 1 txid 124) : 4.3°C, hum 110%
E (19:33:56.201) Peers: CallPeerAsync: write to failed, errno 113 Software caused connection abort, msg {"weather":"GTWT02","name":"prototype","temp":4.300000191,"channel":1,"txid":124,"humidity":110,"battery-low":false,"seqno":71}
I (19:34:55.182) Temperature: GTWT02 (ch 1 txid 124) : 4.3°C, hum 110%
E (19:34:55.191) Peers: CallPeerAsync: write to failed, errno 128 Socket is not connected, msg {"weather":"GTWT02","name":"prototype","temp":4.300000191,"channel":1,"txid":124,"humidity":110,"battery-low":false,"seqno":72}
I (19:35:54.162) Temperature: GTWT02 (ch 1 txid 124) : 4.3°C, hum 110%
E (19:35:54.172) Peers: CallPeerAsync: write to failed, errno 128 Socket is not connected, msg {"weather":"GTWT02","name":"prototype","temp":4.300000191,"channel":1,"txid":124,"humidity":110,"battery-low":false,"seqno":73}
I (19:36:53.152) Temperature: GTWT02 (ch 1 txid 124) : 4.3°C, hum 110%