sociomantic-tsunami / dhtproto

Distributed Hash Table protocol definition, client, fake node, and tests
Boost Software License 1.0
5 stars 22 forks source link

Handle file write errors in channel serializer #196

Closed gavin-norman-sociomantic closed 5 years ago

gavin-norman-sociomantic commented 5 years ago

The channel data is now written to a temp file which is only swapped to the final file path if writing succeeds. This way, the dump file is guaranteed to be in a complete state, reducing the chance of errors during loading.