You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the read function provided by the framer, I get frequent stream closures, even though the server has not sent a close signal. This happens so frequently that it might even occur 3–4 times in a row.
In particular, these errors started to occur once I began receiving binary data encoded with protobuf (I don't really think this detail matters, though).
I am 100% certain that the server side never sends a close signal or drops the connection unexpectedly.
I have tried tungstenite and had no random disconnects, which goes to show that the server does not send any random close signals that could be the cause.
I have looked through the source code and found that the unexpected closures, in my particular case, ONLY occurred once the read_len field of the framer struct became 0 (in the read() function of the framer).
This part of the read function:
Is there something I am doing wrong ? As mentioned previously I am sure that there should not be any unexpected close signals from the server. As of now the implementation is very unreliable.
I am not quite sure if this is a usage error on my side or if there is an issue in the implementation.
If you need any additional information, I would be very happy to provide anything necessary.
If needed, I can also try creating a small, minimal, reproducible example.
The text was updated successfully, but these errors were encountered:
I would make sure that you are not receiving Ping messages that you are ignoring (you have _ => {} branch, so at least log / err there)
Hi, thank you for your hint. Unfortunately I was not able to fix the issue with this change.
If you want to see my full usage its over here.
Covering all variants was not sufficient to fix the random & unexpected closure issues.
The implementation with tungstenite is on the main branch.
Is there anything else I can try ?
Using the read function provided by the framer, I get frequent stream closures, even though the server has not sent a close signal. This happens so frequently that it might even occur 3–4 times in a row.
My usage
In particular, these errors started to occur once I began receiving binary data encoded with protobuf (I don't really think this detail matters, though).
I am 100% certain that the server side never sends a close signal or drops the connection unexpectedly.
I have tried tungstenite and had no random disconnects, which goes to show that the server does not send any random close signals that could be the cause.
I have looked through the source code and found that the unexpected closures, in my particular case, ONLY occurred once the read_len field of the framer struct became 0 (in the read() function of the framer).
This part of the read function:
Is there something I am doing wrong ? As mentioned previously I am sure that there should not be any unexpected close signals from the server. As of now the implementation is very unreliable.
I am not quite sure if this is a usage error on my side or if there is an issue in the implementation.
If you need any additional information, I would be very happy to provide anything necessary.
If needed, I can also try creating a small, minimal, reproducible example.
The text was updated successfully, but these errors were encountered: