added ability to handle multiple connections without disconnect on EOF