> From: "Duives, J. (Jelle)" <[email protected]> > To: "[email protected]" <[email protected]>, > Date: 10/09/2013 02:54 AM > Subject: Thrift server binding to (already) binded port > > Hi, > > I'm using Thrift to transport information from one language to > another. Therefore I have created a TServer and a Client connecting > to it. When creating the server I (logically) need to set a port to > its TServerTransport. The strange thing is that when creating a > second server on the same port next to an already existing server, > it won't throw any exception. It will happily (try to) connect to > the same port. Shouldn't an exception be thrown? > > Jelle
Which OS and language are you using? It you are using C++ and a POSIX like operating system, you may be getting this behavior because of SO_REUSEADDR. Try going into TServerSocket.cpp, searching for THRIFT_NO_SOCKET_CACHING, and commenting out the appropriate setsockopt block of code.
