Commit edbdca82 authored by Ivan Tyagov's avatar Ivan Tyagov

Properly close file handle as otherwise we can quickly reach limit of maximal number of open files.

parent 5a2cec09
...@@ -56,6 +56,7 @@ static int setRelayState(int command) { ...@@ -56,6 +56,7 @@ static int setRelayState(int command) {
/* ERROR HANDLING: i2c transaction failed */ /* ERROR HANDLING: i2c transaction failed */
printf("Error writing to i2c slave."); printf("Error writing to i2c slave.");
} }
close(file);
} }
static void addVariable(UA_Server *server) { static void addVariable(UA_Server *server) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment