Fixed receive callback issue by making receive buffer volatile