[tcpServer] Fix issue when data is sent early