close connection when Firefox disconnects