onConnectionClosed
fun onConnectionClosed(p: TorrentPeer, sessionTime: Int, failed: Boolean, state: TorrentState, fastReconnect: Boolean = false)
Record that a connection to p just closed. This is the port of the bookkeeping in peer_list::connection_closed. Clears the connected flag and optimistic unchoke, optionally stamps lastConnected with sessionTime, bumps the failcount when failed, and re-counts the peer as a candidate if it now is one. If multiple-connections-per-IP is on and this was a non-connectable incoming peer, the entry is erased (we can't reliably identify it again).
Parameters
fastReconnect
if true, lastConnected is left untouched (mirrors !c.fast_reconnect()).