X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/f0dcb6b97d6d40f67698d1f71ac26970f1776f82..ebd5aef6dc92accb509b1cc67eaf72159f35cdfa:/rpc/connection.cc?ds=sidebyside diff --git a/rpc/connection.cc b/rpc/connection.cc index 4e49305..c4edbf6 100644 --- a/rpc/connection.cc +++ b/rpc/connection.cc @@ -6,6 +6,8 @@ #include #include "marshall.h" +connection_delegate::~connection_delegate() {} + connection::connection(connection_delegate * delegate, socket_t && f1, int l1) : fd(move(f1)), delegate_(delegate), lossy_(l1) { @@ -204,7 +206,7 @@ connection_listener::connection_listener(connection_delegate * delegate, in_port tcp_.setsockopt(SOL_SOCKET, SO_RCVTIMEO, timeval{0, 50000}); tcp_.setsockopt(SOL_SOCKET, SO_SNDTIMEO, timeval{0, 50000}); - sockaddr_in sin{}; // zero initialize + sockaddr_in sin = sockaddr_in(); // zero initialize sin.sin_family = AF_INET; sin.sin_port = hton(port); @@ -237,7 +239,7 @@ void connection_listener::read_cb(int) { int s1 = accept(tcp_, (sockaddr *)&sin, &slen); if (s1 < 0) { perror("connection_listener::accept_conn error"); - throw thread_exit_exception(); + throw runtime_error("connection listener failure"); } IF_LEVEL(2) LOG("accept_loop got connection fd=" << s1 << " " << inet_ntoa(sin.sin_addr) << ":" << ntoh(sin.sin_port));