Fix race condition with peer.closed
Add Travis CI