Fixed the bug when creating objectinputstream and objectoutputstream again and again using the same socket