close web socket when leaving database to filesystems