Fixed bug where it was possible that messages originating from client
and directed to sensors would get stuck on server buffer. The server
buffer will now send all buffered messages before going to sleep.