I wonder if this is really the best place to be closing the connection. With it here, the connection will get closed and reopened on each call back... When testing this out, did you attempt closing the connection at other locations. Perhaps closing it only once?