2
0
Эх сурвалжийг харах

fix / workaround for ubuntu

Otherwise, if started with -d as daemon, the netcon service dies after
intercept listen registers.
Janjaap Bos 10 жил өмнө
parent
commit
c8056452b8

+ 3 - 0
netcon/NetconEthernetTap.cpp

@@ -547,6 +547,9 @@ void NetconEthernetTap::threadMain()
 						if (read(_phy.getDescriptor(tcp_connections[i]->dataSock), &c, 1) < 0) {
 						if (read(_phy.getDescriptor(tcp_connections[i]->dataSock), &c, 1) < 0) {
 							// Still in listening state
 							// Still in listening state
 						}
 						}
+						else if (read(_phy.getDescriptor(tcp_connections[i]->rpcSock), &c, 1) < 0) {
+							// Still in listening state
+						}
 						else {
 						else {
 							// Here we should handle the case there there is incoming data (?)
 							// Here we should handle the case there there is incoming data (?)
 							dwr(MSG_DEBUG, " tap_thread(): Listening socketpair closed. Removing RPC connection (%d)\n",
 							dwr(MSG_DEBUG, " tap_thread(): Listening socketpair closed. Removing RPC connection (%d)\n",