Added evbuffer locking