Login Status


ShareSource Site » Projects » komclean » komcleanBug Tracker

Project: KOMclean [Bug Tracker]

(*) Summary   [^] Files  
Actions » View tickets | Report a bug

Bug #297 [CLOSED]

Reason: Fixed

Vital Bug Details
Summery: "Could not create socket" after restarting
  Severity: Very Low
Status: Priority: Low
Assigned to: Nobody Percent Complete: 100%
Bug Reporter
Reported by: Anonymous ( on Tuesday, 13 January 2009, 04:07AM (13/01/2009) )
Bug Details
Steps to reproduce:
1. Exit komclean
2. Restart komclean within 30s

Actual: komclean prints "Could not create socket" and exits.
Expected: everything works :)

Seems komclean isn't using the SO_REUSEADDR socket option - using it should fix the problem.
View History »

Comments

Comment by: Erik Forsberg | Posted: Wednesday, 04 February 2009, 04:11PM (04/02/2009)
I would recommend this patch:

diff -r aec2c6c0b166 src/webui/httpserver.cpp
--- a/src/webui/httpserver.cpp Sat Nov 22 14:55:09 2008 +0100
+++ b/src/webui/httpserver.cpp Wed Feb 04 22:09:31 2009 +0100
@@ -476,6 +476,10 @@
struct sockaddr_in servAddr;

serverSocket = socket(PF_INET, SOCK_STREAM, 0);
+#ifndef WIN32
+ int one = 1;
+ setsockopt(serverSocket, SOL_SOCKET, SO_REUSEADDR, &one, sizeof (int));
+#endif
if (serverSocket < 0)
{
printf("Could not create socket\n");


Comment by: Tim Johansson | Posted: Sunday, 22 February 2009, 09:55AM (22/02/2009)
Patch merged to the 1.1 branch, thanks


Want to comment?

Please login to ShareSource.