close connection when buffer fulled