bitlbee / bitlbee-steam

Steam protocol plugin for BitlBee
GNU General Public License v2.0
126 stars 12 forks source link

Error: HTTP: Response truncated #148

Open roughnecks opened 2 years ago

roughnecks commented 2 years ago

Hello, I'm getting this error very frequently and steam reconnects each time.

https://i.imgur.com/dnG9Qm2.jpeg

I'm connected to a public bitlbee server through Matrix (heisenbridge).

roughnecks commented 2 years ago

I have now compiled the plugin on my own box and apart from the first couple days, when everything seemed fine, I'm now getting other HTTP errors and connection timeouts.

steam - Error: HTTP: 500 Internal Server Error steam - Error: HTTP: Request timed out steam - Login error: Connection timeout steam - Logging in: Signing off.. steam - Logging in: Reconnecting in 405 seconds..

tatokis commented 2 years ago

This should be fixed by https://github.com/bitlbee/bitlbee-steam/pull/147

Do note, that these past few days there's also been Error: HTTP: 503 Service Unavailable which happens on the mobile app as well, so that one is a server side issue and not a bitlbee-steam one.

roughnecks commented 2 years ago

Thank you, will update ASAP.

roughnecks commented 2 years ago

Wait, this was merged on 7 July and I already had pulled the commit.. (i installed bitlbee locally in the meantime).

Now I just see all of 503

steam - Error: HTTP: 503 Service Unavailable
steam - Signing off..

steam - Reconnecting in 5 seconds..

But if it's a server side issue, guess I can close this issue..

tatokis commented 2 years ago

It is a server side issue, yes, however since it is extremely annoying (it re-sends unread messages), I've been increasing the retries and it seems to help "mask" the issue.

You can try applying the following to see how it goes.

diff --git a/steam/steam-http.h b/steam/steam-http.h
index 5c8118c..e776915 100644
--- a/steam/steam-http.h
+++ b/steam/steam-http.h
@@ -43,14 +43,14 @@
  *
  * The maximum amount of times to resend a failed request.
  */
-#define STEAM_HTTP_RESEND_MAX  3
+#define STEAM_HTTP_RESEND_MAX  10

 /**
  * STEAM_HTTP_RESEND_TIMEOUT:
  *
  * The timeout (in milliseconds) between resend attempts.
  */
-#define STEAM_HTTP_RESEND_TIMEOUT  2000
+#define STEAM_HTTP_RESEND_TIMEOUT  4000

 /**
  * STEAM_HTTP_ERROR:
roughnecks commented 2 years ago

Done that, thanks @tatokis Will let you know how it goes.