libp2p / go-ws-transport

a websocket implementation of a go-libp2p transport
Other
60 stars 18 forks source link

fix: add read/write locks #85

Closed Stebalien closed 4 years ago

Stebalien commented 4 years ago

We keep running into races so I figured we might as well just make this all thread-safe. It should have no effect on performance.

The actual bug was setting the write deadline while writing. But we might as well just have read and write locks.

fixes https://github.com/libp2p/go-libp2p-swarm/issues/205