extend/cowboy — pull request #482 by DBarney (2013-03-28 15:01:10+00:00)
Title: optimization: {active, true} only set when needed

Currently all messages sent to a websocket_handler process will trigger
the option {active, true} to be set on the socket. This causes
unnecessary time to be spent setting an option that is already set.
This is especially true for websockets that primarily listen for
messages from other processes and forward them to the connected client.
{active, true} only needs to be set on the socket after a data packet
has been received, and once at the start of the wesocket to "prime the
pump".