~AbstractDiskWriter calles closeFile(), but suppresses exception.
MultiDiskAdaptor::closeFile() logs error if child
DiskWriter::closeFile() throws exception. This exception is not
rethrown. If at least one exception is caught,
MultiDiskAdaptor::closeFile() throws new DlAbortEx.
RequestGroupMan::closeFile() just logs exception and suppress each
exception. Generally, don't call closeFile() in destructor. If you
need to call it, it must suppress the exception.
In aria2, one piece is downloaded from several peers, so when hash
check failed for that piece, it cannot determine which peer(s) sent
bad data. So, we ignore peer who sent last block of data in random
minutes. We use randomized timeout because all peers get waken up at
the almost same time.
The help messages shown when argument error were redesigned and less
verbose now. When unknown or ambiguous option is given, show
suggestions like "Did you mean...". Some constant values related to
levenstein distance are borrowed from git help.c.
This feature stops application when process PID is not running. This
is useful if aria2 process is forked from a parent process. The parent
process can fork aria2 with its own pid and when parent process exits
for some reason, aria2 can detect it and shutdown itself.
The code which detects whether or not given process PID is running is
contributed by Emmanuel Engelhart.
We use control connection address as data connection address, so we
don't need to store both address and port. We just store port in
PASV/EPSV response and use SocketCore::getPeerInfo() to get peer's
address when needed.
The previous implementation constructs proxy URI in OptionHandler but
it cannot handle with the situation when user, password and proxy URI
is given various order. Now we just set rules: username set in
--*-proxy-user overrides username in --*-proxy option, no matter in
any order username, password and proxy URI are parsed. Likewise,
password set in --*--proxy-passwd overrides password in --*-proxy
option.