-
Notifications
You must be signed in to change notification settings - Fork 13.3k
TCP connection always Accidental disconnection #2552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@kingxf1995, if the WiFi connection is unreliable, for example due to radio interference, then the behaviour you report is exactly what you would want, that is, both ends are aware there is no longer a TCP connection. However, there is circumstances where the ESP thinks it is connected so that client.connected() will report true when it is not connected and your sketch would get stuck in an endless loop. |
Is it true that the device still responds to ping when its stuck in this state? Ive seen this, if so.
… On Dec 9, 2016, at 12:49 PM, Ken Taylor ***@***.***> wrote:
@kingxf1995 <https://github.com/kingxf1995>, if the WiFi connection is unreliable, for example due to radio interference, then the behaviour you report is exactly what you would want, that is, both ends are aware there is no longer a TCP connection.
However, there is circumstances <#2750> where the ESP thinks it is connected so that client.connected() will report true when it is not connected and your sketch would get stuck in an endless loop.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#2552 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKy2zmn3R9OOeNkCy9Fd5kJJQg00C9HFks5rGb7pgaJpZM4KHPrz>.
|
sorry yes I mean when its stuck in the loop forever, as you mention in that thread, ill ask over there...
… On Dec 9, 2016, at 1:14 PM, Ken Taylor ***@***.***> wrote:
When @mtnbrit <https://github.com/mtnbrit> says
stuck in this state
which state is meant?
If the query relates to client.connected() reporting connection state incorrectly please ask in #2750 <#2750>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2552 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKy2zi15hwpbiIBHlQ3L-_yND_KoBWqGks5rGcS-gaJpZM4KHPrz>.
|
Thank you @kentaylor @mtnbrit , I have solved this problem. In fact I used a bad router which led to packet loss seriously. |
Per previous comment, closing as resolved. |
Hardware
Hardware: ESP-12E
Core Version: 2.3.0
Description
I found esp826612e network may have some problem, so I write a simple code to test it.
In short, ESP826612e act as station join my router wifi, and act as a tcp server, accept only one connection, my computer act as a TCP client. Client send a byte then server recived it and send back a same byte. In loop, sometime ESP8266 think TCP connection is break, computer found tcp connection is break after a short time
Sketch
test script
The text was updated successfully, but these errors were encountered: