you (or more likely the programmer who wrote the program you are using) called connect(2) on a socket(2) twice, instead you should close(2) and recreate the socket(2) first.
One page links to EISCONN: