src/connection.c: keep a reference to a message inside of message_function