Fix crash when transport goes away
Merge pull request #1 from simonratner/fix/transport-close

Fix crash when transport goes away