Skip to content

Commit

Permalink
Don't create a new Buffer to wrap a sliced Buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
pekim committed Jul 3, 2012
1 parent d7dd319 commit f0ff5af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message-io.coffee
Expand Up @@ -28,7 +28,7 @@ class MessageIO extends EventEmitter
if (packet.isLast())
@emit('message')

@packetBuffer = new Buffer(@packetBuffer.slice(length))
@packetBuffer = @packetBuffer.slice(length)

packetSize: (packetSize) ->
if arguments.length > 0
Expand Down

0 comments on commit f0ff5af

Please sign in to comment.