Permalink
Browse files

Cleanup.

  • Loading branch information...
1 parent 1fd7a35 commit 2bb12d51a50ec325add4367e5eef8e334577a7e0 @jlouis committed Oct 20, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/etorrent_peer_control.erl
View
6 src/etorrent_peer_control.erl
@@ -685,9 +685,9 @@ handle_message({bitfield, Bitfield}, State) ->
NewState = State#state{remote=NewRemote, local=NewLocal},
{ok, NewState};
-handle_message({piece, Index, Offset, Data}, State) ->
- #state{torrent_id=TorrentId} = State,
- #state{send_pid=SendPid, download=Download, local=Local, remote=Remote} = State,
+handle_message(
+ {piece, Index, Offset, Data},
+ #state{send_pid=SendPid, download=Download, local=Local, torrent_id=TorrentId, remote=Remote} = State) ->
Length = byte_size(Data),
Requests = etorrent_peerstate:requests(Local),
NewLocal = case etorrent_rqueue:is_head(Index, Offset, Length, Requests) of

0 comments on commit 2bb12d5

Please sign in to comment.