Bug/4573 close always returns

@karlj-spindance @raensink please review.

Pull with lwipdemo.
Oh, probably to make a compiler warning go away, yes?