mirror of https://github.com/libp2p/go-libp2p.git
Browse Source
1. Ensure we only close the connection once. Especially, don't call the done function multiple times and/or concurrently. 2. Call WriteControl instead of WriteMessage in Close. WriteControl is thread-safe, WriteMessage isn't. Also, this sets a 100ms deadline on gracefully closing connections.pull/1422/head
Steven Allen
7 years ago
1 changed files with 20 additions and 5 deletions
Loading…
Reference in new issue