Commit Graph

1271 Commits

Author SHA1 Message Date
zzz e7774feb12 i2psnark: Remove outstanding requests from pieces when connection is replaced
Hopefully fixes rare case where torrents get stuck.
Tested that it doesn't break anything, but was never able to reproduce the issue.

As reported in torrent at http://tracker2.postman.i2p/index.php?view=TorrentDetail&id=85798
Fix adapted and greatly simplified from source code included in that torrent.
Apparently from old trac ticket #691.
Credit: smtorrents

Also:
- Fix place where removePeerFromPieces() was being called twice,
  once directly and once from disconnect(true).
- Fix javadoc for Peer.disconnect()
- Fix log typo
- Add comments

Description from OP of that torrent:

This update now finally fixes the decades old ticket number 691 which prevents torrents to complete from time to time. The bug manifests itself by keeping a couple of outstanding pieces (> 8, so we never get into the endgame) that are marked as requested from a peerID, with a corresponding peer that has long gone. Those pieces are never requested from any other peer. There are consequently more peerIDs than peers connected.

The only place in code, where peers and peer IDs are mixed up, is a reconnect logic that tries to reuse an existing connection while keeping outstanding requests from the old connection, when the other end tries to reconnect.

Keeping old requests is faulty by itself because someone reconnecting to us will definitely have dropped our previous requests, so we must do the same. The fix now always drops previous connections along with all outstanding requests.
2025-04-20 12:06:28 -04:00
zzz 5cfa74d785 i2psnark, i2ptunnel: Use Long.compare() in sorters
available in Java 7 / Android API 19 (our minSDK is currently 20)
2025-04-20 09:29:06 -04:00
zzz 51dbd493fe i2psnark: Add 2nd tie break for peer count when sorting by status 2025-04-20 09:18:39 -04:00
zzz 9daa5763ba i2psnark: Show lifetime download rate since added on details page 2025-04-20 08:56:50 -04:00
zzz 9a29b456e0 i2psnark: Show current tunnel config in dropdowns even if outside normal range
if user changed i2psnark.config manually
as reported at http://ramble.i2p/f/I2P/5704
2025-04-20 08:51:43 -04:00
zzz 705e24f0bf i2psnark: DTG/Bubble notifications on torrent add failures 2025-03-30 07:08:27 -04:00
zzz c83b092955 i2psnark: Use torrent name instead of torrent file name in DTG/bubble completion notifications 2025-03-19 09:49:17 -04:00
zzz de2f2007c4 Console: Improve writing efficiency
replace out.write(buf.toString) with out.append(buf)
to eliminate extra copy and object churn
2025-02-23 20:45:06 -05:00
zzz 940205f8c8 Merge branch 'bubbles' into 'master'
Console: Add support for notification bubbles

See merge request i2p-hackers/i2p.i2p!230
2025-02-22 11:07:44 +00:00
zzz 652d55a95c Console: Add support for notification bubbles 2025-02-22 11:07:43 +00:00
zzz b915327fba i2psnark: Add config message for changing down bw limit 2025-02-21 15:26:42 -05:00
zzz c248a999a4 Streaming: Promote profile properties to interface
i2ptunnel: set bulk profile for servers;
i2psnark: set bulk profile;
Prep for tunnel bw params (proposal 168)
2025-02-21 10:22:24 -05:00
zzz 0a91441877 Build: Put i2psnark-standalone build outputs in the i2psnark build/ dir 2025-02-10 08:41:26 -05:00
zzz f0e3f6eaf3 i2psnark: Reduce PeerCoordinator CHECK_PERIOD interval
to make the choke/unchoke cycles a little faster
2025-02-07 13:51:26 -05:00
zzz f09262ac48 i2psnark: require POST on all forms 2025-01-17 12:16:27 +00:00
zzz 37cdade492 Build: Fix some deprecation warnings all over 2024-11-28 17:17:11 -05:00
zzz a1949bf612 Build: Suppress JNI warnings from Java 24 for CLI and i2psnark-standalone
and add note to wrapper.config on how to do it there for normal runtime
2024-11-28 10:50:26 -05:00
zzz f7d2893751 Add complete Gan Chinese translation 2024-11-26 12:15:32 -05:00
zzz 30a3806da8 i2psnark: Recognize EepTorrent client 2024-11-20 08:59:27 -05:00
zzz 910a44484f javadoc fix 2024-09-25 08:22:02 -04:00
zzz bca5b65b1a i2psnark: Prevent changing infohash in metainfo edit CLI
Tweaks to previous MR:
_ Use new constructor for edit CLI
- Javadocs for new constructor
- Add new_url_list param to new constructor
- Set creation date if unset
2024-09-20 09:47:58 -04:00
marek 702f95b384 Fix broken info hash after torrent edit. 2024-09-04 19:16:37 +00:00
zzz eec09d4c9c i2psnark: Reduce minimum bandwidth, reduce max connections if low bandwidth
per user request
2024-08-09 09:59:57 -04:00
zzz 5a3a7b24af i2psnark, susimail: Normailze strings when searching (Gitlab #488)
to improve search for non-ASCII strings.
Normalize both search and searched strings to NFKD when searching.
NFKD is best because it is more efficient than NFKC and it removes
formatting distinctions. This results in the best fuzzy matching.
2024-08-09 09:37:50 -04:00
zzz 318675923a i2psnark typo 2024-06-30 10:57:50 -04:00
zzz 38e6fc5ef2 i2psnark: Fix config page showing router limit instead of configured i2psnark limit for max up bw after restart (Github #75)
This was just a display issue; actual internal limit was correct.
Snark limit will continue to be capped at about 60% of the router limit
to account for overhead.
2024-06-29 10:26:32 -04:00
zzz c15b29cd4d javadoc fix 2024-06-10 06:51:11 -04:00
zzz a0f92b2e28 CLI: Fix getopt program names
these are output by getopt in error messages
2024-06-05 09:05:51 -04:00
zzz aedcd02506 i2psnark: Make PEX more efficient
by only sending new peers, as in ut_pex.
Track connected time and last pex sent time, and only send
peers connected since the last sent time.
Usually, there are no new peers, so now we don't send a message at all.
Also, don't send PEX to seeds after the handshake.
2024-06-04 08:27:12 -04:00
zzz 4659a922b8 i2psnark: Fix leaked requests and partial pieces with data 2024-06-04 11:32:57 +00:00
zzz 050a52a2ea i2psnark: Fix NPE when attempting to create torrent with too many files
as reported by mrt
improve error message
2024-05-19 10:29:39 -04:00
zzz 2ab0e52829 Build: Update i2psnark-standalone manifest 2024-04-11 08:05:34 -04:00
zzz 97fe2bbed9 i2psnark: Add more known opentrackers
as requested
2024-03-25 10:41:47 -04:00
zzz 9c1b926a09 i2psnark: Preserve private=0 in torrent files 2024-03-23 11:53:47 +00:00
zzz 6bb6210f70 i2psnark: Fix buttons on torrent details page (JRE 21) 2024-03-09 13:24:51 -05:00
zzz 92e7ebdf41 i2psnark: Don't allow changing data dir when connected
Delete all torrents except magnets when changing data dir
2024-02-26 08:35:24 -05:00
zzz 0af58d7723 javadoc fix 2024-02-14 10:50:43 -05:00
zzz 1126b0ae4e i2psnark: Sanitize unicode LTR/RTL control chars 2024-01-29 08:34:34 -05:00
zzz 05c9e63bae Merge branch 'snark-dnd' into 'master'
i2psnark: Add js drag-n-drop

See merge request i2p-hackers/i2p.i2p!165
2024-01-22 13:25:31 +00:00
zzz bb48a3d84a i2psnark: Add js drag-n-drop 2024-01-22 13:25:31 +00:00
zzz ba39f58800 Merge branch 'snark-bw' into 'master'
i2psnark: Bandwidth limiter improvements

See merge request i2p-hackers/i2p.i2p!164
2024-01-15 10:05:46 +00:00
zzz db52cc7811 i2psnark: Bandwidth limiter improvements 2024-01-15 10:05:46 +00:00
zzz d6d7044832 Console: Fix iframe size issues 2024-01-10 18:35:39 +00:00
zzz e249449817 i2psnark: Adjust max peers for small torrents 2023-12-22 10:48:31 -05:00
eyedeekay ae1c939403 SAM/I2Ptunnel/I2PSnark: update Javadocs to reflect @since 0.9.61 2023-12-12 18:11:44 -05:00
zzz 7048ba6784 i2psnark: Change js mime type as per RFC 9239 2023-12-01 08:18:18 -05:00
zzz d61b8af138 i2psnark: Delay bandwidth limits check briefly
to avoid intermittent "Unable to connect to I2P" message at startup.
2023-11-27 06:52:26 -05:00
zzz 9fc2426e83 i2psnark: Remove things in html, not by hiding them in CSS 2023-11-25 12:47:48 -05:00
zzz 9d4bb311af i2psnark: Revise tagged string 2023-11-23 06:00:52 -05:00
zzz cfa99b40a1 i2psnark: Uncomment and fix local torrent file picker 2023-11-18 19:12:50 +00:00