Opened 12 years ago
Closed 12 years ago
#1740 closed Bug (fixed)
Some OS X users report having a hard time finding peers, even in busy swarms
Reported by: | charles | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | 1.50 |
Component: | libtransmission | Version: | 1.41 |
Severity: | Major | Keywords: | |
Cc: |
Description
Looks like one problem here is in the "fairness" phase of bandwidth.c's bandwidth allocation code, introduced in 1.41, which goes round-robin to all the open sockets and tries to pump them. Sockets are opened in non-blocking mode, so they may not be done connecting to the peers before bandwidth.c pumps them. In Linux, the read/write calls result in an EINPROGRESS errno, which is handled in our code, but OS X returns a different errno which was treated as an error.
One solution is to add a flag to the peer-io object that denotes whether the socket has finished connecting or not, and to set it to true once the libevent polling says that the socket is ready for IO.
Change History (1)
comment:1 Changed 12 years ago by charles
- Resolution set to fixed
- Status changed from new to closed
fixed in trunk in r7747.
backported to 1.5x branch in 7767.