Closes the database connection on stream end
0.1.4