Use correct method for closing a connection

Signed-off-by: Michal Čihař <michal@cihar.com>