[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] tcp_new() returns an in-used pcb?
From: |
Kieran Mansley |
Subject: |
Re: [lwip-devel] tcp_new() returns an in-used pcb? |
Date: |
Mon, 9 Apr 2012 16:22:14 +0100 |
On 2 Apr 2012, at 07:33, narke wrote:
> Hi,
>
> Is there any reason that could cause tcp_new() returns a pcb which
> however is already in tcp_active_pcbs list. I found this seemed
> happen when my application quite often open and then close
> connections. The newly allocated pcb returned from tcp_new()
> eventually caused my program dead when it was being inserted into the
> tcp_active_pcbs list by lwip code.
>
> Is it possible any bug around here? Thanks in advance.
If that were happening, yes, it's a bug. But it's most likely a bug in the way
you're using lwIP rather than in lwIP itself. E.g. creating sockets from two
threads at the same time could I think result in this.
Kieran