Fix for Bug 456370 - Close connection while do the cancel

Signed-off-by: xinzhao-acutate <xzhao@actuate.com>