mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
I2P SAM connection not recovered when lost #15136
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#15136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mpeter50 on GitHub (Nov 5, 2023).
qBittorrent & operating system versions
qBittorrent: 4.6.0 x64
Qt: 6.4.3
Libtorrent: 2.0.9.0
Boost: 1.83.0
OpenSSL: 1.1.1w
zlib: 1.3
What is the problem?
When the SAM connection to the I2P router is lost, it is not recovered automatically.

This is not directly visible in qBittorrent (or is it?), but the I2P router console shows on the sidebar whether there are any SAM clients connected to it:
When qBittorrent loses the SAM connection, the above list does not include the "SAM TCP Client" line anymore, as my router has no other SAM clients.
Upon disabling and re-enabling I2P in the qBittorrent Connection settings, the "SAM TCP Client" line reappears in the above list.
So far I have identified sleep/hibernation for a longer period of time to cause this issue. It happening for as short as 2 minutes does not do so.
Steps to reproduce
Additional context
The I2P router to which qBittorrent connects is running on a different machine on the local network.
It is the Java version available here (ran on Linux, in Docker), version 2.3.0-0
I remember as if qB would log losing the SAM connection, but now I don't see it. Maybe that was only happening in the pre-release.
Another thing to note is that according to my I2P Router, something on my computer (I assumq qB, because I did not set up any SAM clients) is constantly re-registering it's SAM Handlers and SAM Bridges at the I2P Router.
I do not know whether it is normal. I suspect that it is not, so I have mentioned this here.
I see this in the logs:
What is repeated here 2 times, 4 seconds apart, seem to be happening every 3-6 seconds.
It does not go an at all times, but when it does, it gets repeated this way.
Now that I'm looking at it again, this might be happening all the while qB is not connected according to the Local Tunnels list that I have screenshotted.
Log(s) & preferences file(s)
No response
@glassez commented on GitHub (Nov 5, 2023):
This issue shoud be reported to libtorrent since it is actually responsible for such backend stuff.
@mpeter50 commented on GitHub (Nov 5, 2023):
Oh, thanks!
It seems there is a similar issue for it already there: arvidn/libtorrent#7453
@Neustradamus commented on GitHub (Jan 27, 2025):
@arvidn has done a recent PR about I2P: