I am getting following problem while using ManatOutputStream and MantaInputStream in my code.
My one piece of code code write the data in queue using ManatOutputStream write method and another is to read from the same queue using read method. After the complete process I want to close this thread and also I want to release the port occupied by this If it is not happening my new request occures a new port each time and in production it will crash.
Even If i just write following code and executing , Program thread is not closing and Expicitely I have to press Ctrl-c to terminate it.
MantaInputStream mantaInputStream = new MantaInputStream();
Can anyone please reply how it is possible to release the port and closing the request ?