We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5204c0e commit fbdafa2Copy full SHA for fbdafa2
SocketBase/NodeStatus.cs
@@ -41,6 +41,7 @@ public void Save(string filePath)
41
using (var stream = File.Create(filePath))
42
{
43
serializer.Serialize(stream, this);
44
+ stream.Flush();
45
stream.Close();
46
}
47
@@ -54,7 +55,7 @@ public static NodeStatus LoadFrom(string filePath)
54
55
56
var serializer = new BinaryFormatter();
57
- using (var stream = File.Create(filePath))
58
+ using (var stream = File.Open(filePath, FileMode.Open, FileAccess.Read))
59
60
var status = serializer.Deserialize(stream) as NodeStatus;
61
0 commit comments