Skip to content

Commit

Permalink
Fix bug resulting in AssertionErrors and potential NPEs in HttpClient…
Browse files Browse the repository at this point in the history
… when using pipelined request dispatch
  • Loading branch information
sirthias committed Mar 5, 2012
1 parent 542f4dc commit df7a681
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spray-can/src/main/scala/cc/spray/can/LinkedList.scala
Expand Up @@ -56,16 +56,16 @@ private[can] class LinkedList[Elem >: Null <: LinkedList.Element[Elem]] {
}

def -= (rec: Elem) {
require(rec.list == this, "Cannot remove an element that is not part of this list")
if (rec == last) {
if (rec == first) {
require(rec.list eq this, "Cannot remove an element that is not part of this list")
if (rec eq last) {
if (rec eq first) {
first = null
last = null
} else {
last = rec.prev
last.next = null
}
} else if (rec == first) {
} else if (rec eq first) {
first = rec.next
first.prev = null
} else {
Expand Down

0 comments on commit df7a681

Please sign in to comment.