>> while(run_receiver)
This is unsynchronized access to a shared variable, which is an error. Instead, you could loop until the socket is no longer valid. So the thread can "signaled" to exit by closing the socket.

>> if (pthread_join(run_receiver, NULL))
That should be "*pthread_reader" or "thread_reader". That may be your Valgrind leak, however, false-positives from Valgrind have been discussed before: Memory leak on pthread_create?

>> arrsize(date_warn)
This is incorrect. date_warn is a pointer, not an array. To fix, declare date_warn as: static const char date_warn[] = "..." - or just use strlen() (which won't sent the null-terminator).

gg