Don't leak sendIndexes on disconnect (fixes #2589)

Adds a Closed() method on protocol.Connection and clears up
wireformatConnection a little too.
This commit is contained in:
Jakob Borg
2016-01-11 16:49:44 +01:00
parent 01c70caa8f
commit acdddc0b79
5 changed files with 32 additions and 30 deletions

View File

@@ -243,6 +243,10 @@ func (FakeConnection) Ping() bool {
return true
}
func (FakeConnection) Closed() bool {
return false
}
func (FakeConnection) Statistics() protocol.Statistics {
return protocol.Statistics{}
}