on disconnect event, flush messages before closing the nexus

Change-Id: I4cabb9f0ae76e28e4a25417fed27399e57bda6b4
Signed-off-by: Eyal Salomon <esalomon@mellanox.com>