Teckna Teckna

FTP socket problem

Discussion created by Teckna Teckna on Dec 7, 2012
Latest reply on Oct 29, 2014 by Teckna Teckna

Hi everyone,


I'm using CW 10.2, MQX 3.8.1 and a custom board with MK60DN512


Here is a sample test task:

error = RTCS_create();

if( error != RTCS_OK )


     printf( "\nRTCS failed to initialize, error = %X", error );



while( 1 )


     FTPd_init( "FTP server", PRIO_FTPSRV, STACK_FTPSRV );

     _time_delay_ticks( 500 );


     _time_delay_ticks( 500 );



If I run this test, after some times the FTP cycle is executed I can see the socket number grow up (like in the picture):


The FTPd_init function creates an FTP server task that creates two sockets (the socket in listening state and the socket in ground state).

The FTPd_stop function destroys the task FTP server task, but it seems to close only the socket in listening state and not the socket in ground state.

Is this a bug or don't I make the correct steps to close both sockets?


Many thanks