fix exceptions when server reads messages some slower than client writes