Stop EM when server closes connection

Signed-off-by: Alex Jackson <ajackson@pivotallabs.com>