apache/spark — pull request #1985 by viirya (2014-08-16 14:47:02+00:00)
Title: [SPARK-3077] fix unnecessarily removing sendingConnection when closing connections

Currently in `ConnectionManager`, when a `ReceivingConnection` is closing, the corresponding `SendingConnection` would be removed twice. It causes unnecessary errors when removing `sendingConnectionManagerId` from `connectionsById`. There are also redundant codes in the implementation.